In this study, well-ordered and vertically-aligned metal (nickel (Ni)/zinc (Zn)) and metal oxides (NiO/ZnO) nano heterojunctions (NHJs) were grown inside the nanopores of anodic aluminum oxide template (AAOT) using electrochemical deposition (ECD) and thermal oxidization. The prepared NHJs are with a controllable length and diameter. The electrical properties of NiO/ZnO NHJs show a rectifying behavior of a p-n junction, while the Ni/Zn NHJs show an ohmic behavior. The optoelectronic characteristics demonstrate that the NiO/ZnO NHJs have fairly good sensitivity and response to the ultraviolet (UV) light (366 nm) with decrease in Vth by about 75% and an increase in Jr by about 80% @ 6 mW/cm2. The low dimension of NHJs shows profound quantum confinement effect, which would be potential applications on nano integrated photonics, such as photodetectors, optical sensors and biosensors.