We reported a highly spectrum-selective ultraviolet photodiode based on In2O3 with dipole-forbidden bandgap transition. The near-band-edge ultraviolet emission and absorption were observed in the hybrid In2O3 films with the In2O3 nanocrystals embedded into the amorphous In2O3 matrix, indicating that the dipole-forbidden rule of bulk In2O3 is broken. The hybrid In2O3 film was deposited on the p-GaN/sapphire wafer to form an In2O3/p-GaN heterojunction photodiode. The photodiode showed an obvious rectifying behavior in a current–voltage measurement and a narrow-band ultraviolet photoresponse at the near-band-edge region under back-illumination conditions. Electronic structure calculations based on the first-principles method demonstrate that the breaking of dipole-forbidden transition rule is derived from the surface states of In2O3 nanocrystals. Our results suggest that tailoring the In2O3 nanocrystalline structure is an effective route to achieving novel optical properties and applying these properties to the ultraviolet optoelectronic field.