Wastewater treatment by microalgae is the economical and environmentally friendly strategy, but is still challenged with the strict discharge standards and valuable biomass exploitations. The carbon and nitrogen metabolism of Chlorella pyrenoidosa was improved by the red LED light and starch addition to treat Tilapia aquaculture wastewater (T-AW) and produce protein simultaneously in a plate photobioreactor. The red LED light was applied to improve the nutrient removals at an outdoor temperature, but the concentrations except total nitrogen did not satisfy the discharge standards. After starch addition, the removal efficiencies of total phosphorus, total nitrogen, chemical oxygen demand, and total ammonia nitrogen were 85.15, 96.96, 88.53, and 98.01 % in a flat-plate photobioreactor, respectively, which met the discharge standards and the protein production reached 0.60 g/L. At a molecular level, the metabolic flux and transcriptome analyses showed that red light promoted carbon flux of the Embden-Meyerhof-Pranas pathway and tricarboxylic cycle, and upregulated the levels of genes encoding α-amylase, glutamine synthetase, glutamate dehydrogenase, nitrate transporter, and ammonium transporter, which facilitated nutrients removal and provided nitrogen sources for protein biosynthesis. The harvesting C. pyrenoidosa possessed the 62 % essential amino acids and great lipid composition for biofuels. This study provided a new orientation for outdoor wastewater treatment and protein production by collaboratively regulating the carbon and nitrogen metabolism of microalgae.