SnO 2 has attracted considerable attention due to its wide bandgap, large exciton binding energy, and outstanding electrical and optoelectronic features. Owing to the lack of reliable and reproducible p-type SnO 2 , many challenges on developing SnO 2 -based optoelectronic devices and their practical applications still remain. Herein, single-crystal SnO 2 microwires (MWs) are acquired via the self-catalyzed approach. As a strategic alternative, n - SnO 2 MW/p-GaN heterojunction was constructed, which exhibited selectable dual-functionalities of light-emitting and photodetection when operated by applying an appropriate voltage. The device illustrated a distinct near-ultraviolet light-emission peaking at ∼ 395.0 nm and a linewidth ∼ 50 nm . Significantly, the device characteristics, in terms of the main peak positions and linewidth, are nearly invariant as functions of various injection current, suggesting that quantum-confined Stark effect is essentially absent. Meanwhile, the identical n - SnO 2 MW/p-GaN heterojunction can also achieve photovoltaic-type light detection. The device can steadily feature ultraviolet photodetecting ability, including the ultraviolet/visible rejection ratio ( R 360 nm / R 400 nm ) ∼ 1.5 × 10 3 , high photodark current ratio of 10 5 , fast response speed of 9.2/51 ms, maximum responsivity of 1.5 A/W, and detectivity of 1.3 × 10 13 Jones under 360 nm light at − 3 V bias. Therefore, the bifunctional device not only displays distinct near-ultraviolet light emission, but also has the ability of high-sensitive ultraviolet photodetection. The novel design of n - SnO 2 MW/p-GaN heterojunction bifunctional systems is expected to open doors to practical application of SnO 2 microstructures/nanostructures for large-scale device miniaturization, integration and multifunction in next-generation high-performance photoelectronic devices.