Raw biogas is a valuable renewable energy but usually requires upgrading. The mixed LED (light-emitting diode) light wavelengths achieved much better microalgae growth than that of the monochromatic. The best LED light wavelength mix ratio for both biogas upgrading and biogas slurry nutrient removal was the red:blue ratio of 5:5. Lower influent CH4 (methane) concentration achieved higher biogas slurry nutrient removal efficiency, whereas moderate influent CH4 concentration achieved the best biogas upgrading effect. Therefore the optimal parameters were determined to lie between the low and moderate influent CH4 concentrations and the mixed red:blue ratio of 5:5 LED light wavelengths. They achieved the best biogas upgrading and biogas slurry nutrient purification effects with the following values: 92.60 ± 2.24% (v/v) of upgraded biogas CH4 concentration, 85.73 ± 4.26% of chemical oxygen demand removal efficiency, 73.21 ± 2.51% of total nitrogen removal efficiency, and 73.89 ± 4.82% total phosphorus removal efficiency.