Microalgae-based wastewater treatment has recently emerged as a promising approach for the simultaneous removal of nutrients and production of biomass. However, certain wastewater types, particularly piggery wastewater, contain high levels of ammonia that can be cytotoxic to microalgal cells. In experiments with piggery wastewater adjusted to ammonia concentrations of 45, 65, and 85 mg L-1, Chlamydomonas sp. demonstrated significantly higher removal efficiencies for ammonia and total phosphorus compared to the control medium (BG11 supplemented with equivalent ammonia nitrogen). The microalgal lipid content increased to 38.6% at 65 mg L-1 and reached 44% at 85 mg L-1, depending on the ammonia concentration. Fatty acid methyl ester analysis revealed a higher proportion of C16 : 0 (palmitic acid) at the 65 mg L-1 ammonia level, resulting in a composition favorable for biodiesel production. However, the accumulation of biodiesel-relevant fatty acids was suppressed at the excessive ammonia concentration of 85 mg L-1. In conclusion, this study underscores the metabolic adaptation and lipid regulation of Chlamydomonas sp. in high-nitrogen wastewater environments, providing a foundation for developing microalgae-based wastewater treatment and biomass valorization strategies.