<p>In this experiment, in the background of the plateau environment, the effects of ultraviolet irradiation on the microbial community structure, metabolic pathways and nitrogen metabolism function genes of sewage were studied at 0 (control group), 5, 10, 30, and 180 min. The results showed that the increase of UV irradiation time promoted the microbial richness of sewage, but decreased the microbial diversity. In terms of community structure, the increase of ultraviolet irradiation time will inhibit or promote some bacterial genera, for example, it has a promoting effect on Bacteroidota, norank_f_ Saprospiraceae, etc., and an inhibitory effect on Phreatobacter. The relative abundance of metabolic pathways changed significantly with the increase of UV irradiation time, and the change trends at different metabolic levels were the same. In nitrogen metabolism pathways, the relative abundance of genes involved in nitrification and denitrification functions was inhibited by the duration of UV irradiation.</p>