We report the nanoscale optical investigation of a single GaN p-n junction nanorod by cathodoluminescence (CL) in a scanning transmission electron microscope. CL emission characteristic of dopant-related transitions was correlated to doping and structural defect in the nanorod, and used to determine p-n junction position and minority carrier diffusion lengths of 650 nm and 165 nm for electrons and holes, respectively. Temperature-dependent CL study reveals an activation energy of 19 meV for non-radiative recombination in Mg-doped GaN nanorods. These results directly correlate doping, structure, carrier dynamics, and optical properties of GaN nanostructure, and provide insights for device design and fabrication. V