Based on first-principles, we calculate the effect of nonmetallic atoms (H, C, N, and O) adsorbing on the surface of In 0.5 Ga 0.5 N nanowires on their photoelectric properties. We first analyze the influence of In atom arrangements and nonmetallic atom adsorption positions in nanowires on system stability. When all In atoms are in the outermost layer of nanowires, In 0.5 Ga 0.5 N nanowires are the most stable. H, C, and O atoms are most stable when adsorbed at the T Ga position, while the N atom is more inclined to adsorb at the C position. On this basis, we conduct research on the effect of nonmetallic atomic adsorption on In 0.5 Ga 0.5 N nanowires. The results show that the work function of nanowires can be reduced effectively by the four kinds of atomic adsorption. N atom adsorption has the most obvious effect on the bandgap. This is mainly due to the fact that N atom adsorption creates a new impurity level near the Fermi level. The Fermi level will cross the conduction band to turn the In 0.5 Ga 0.5 N nanowire into an n-type semiconductor. The improvement of optical properties by nonmetallic atomic adsorption is relatively insignificant. However, due to the high absorption coefficient and low reflectivity over a wide wavelength range, as well as the low difficulty of electron escape, nanowires that adsorb atoms have enormous potential for applications in solar cells and vacuum optoelectronic devices that require a wide spectral response.