The discharge of livestock wastewater without appropriate treatment causes severe harm to the environment and human health. In the pursuit of finding solutions to this problem, the cultivation of microalgae as feedstock for biodiesel and animal feed additive using livestock wastewater coupled with the removal of nutrients from wastewater has become a hot research topic. In this study, the cultivation of Spirulina platensis using piggery wastewater for the production of biomass and the removal of nutrients were studied. The results of single factor experiments confirmed that Cu2+ seriously inhibit the growth of Spirulina platensis, while the influences of nitrogen, phosphorous, and zinc on the growth of Spirulina platensis can all be described as "low promotes high inhibits." Spirulina platensis grew well in the 4-fold dilution of piggery wastewater supplemented with moderate sodium bicarbonate, which indicated that it is the limiting nutrients for Spirulina platensis growth in piggery wastewater. The biomass concentration of Spirulina platensis reached 0.56g/L after 8days of culture at the optimal conditions proposed by the response surface method, which were as follows: 4-fold dilution of piggery wastewater, 7g/L sodium bicarbonate, pH of 10.5, initial OD560 of 0.63, light intensity of 3030lx, and light time/dark time of 16h/8h. Spirulina platensis cultured in the diluted piggery wastewater contained 43.89% protein, 9.4% crude lipid, 6.41mg/g chlorophyll a, 4.18% total sugar, 27.7mg/kg Cu, and 246.2mg/kg Zn. The removal efficiency for TN, TP, COD, Zn, and Cu from the wastewater by Spirulina platensis was 76%, 72%, 93.1%, 93.5%, and 82.5%, respectively. These results demonstrated the feasibility of piggery wastewater treatment by the cultivation of Spirulina platensis.