We demonstrate an efficiency enhancement of an InP nanowire (NW) axial p–n junction solar cell by cleaning the NW surface. NW arrays were grown with <i>in situ</i> HCl etching on an InP substrate patterned by nanoimprint lithography, and the NWs surfaces were cleaned after growth by piranha etching. We find that the postgrowth piranha etching is critical for obtaining a good solar cell performance. With this procedure, a high diode rectification factor of 10<sup>7</sup> is obtained at ±1 V. The resulting NW solar cell exhibits an open-circuit voltage (<i>V</i><sub>oc</sub>) of 0.73 V, a short-circuit current density (<i>J</i><sub>sc</sub>) of 21 mA/cm<sup>2</sup>, and a fill factor (FF) of 0.73 at 1 sun. This yields a power conversion effic...