Immobilized microalgae biotechnologies can conserve water and space by low-carbon wastewater treatment and resource recovery in a recirculating aquaculture system (RAS). However, technical process parameters have been unoptimized considering the mutual interaction between factors. In this study, machine learning optimized the parameters of alginate-immobilized Chlorella vulgaris (C. vulgaris), that is, 474 μmol/(m2·s) of light intensity, 23 × 106 cells/mL for initial cell number, and 2.07 mm particle size. Importantly, under continuous illumination, the immobilized C. vulgaris and microalgal-bacterial consortium improved water purification and biomass reutilization. Transcriptomics of C. vulgaris showed enhanced nitrogen removal by increasing pyridine nucleotide and lipid accumulation via enhanced triacylglycerol synthesis. Symbiotic bacteria upregulated genes for nitrate reduction and organic matter degradation, which stimulated biomass accumulation through CO2 fixation and starch synthesis. The recoverable microalgae (1.94 g/L biomass, 47 % protein, 26.23 % lipids), struvite (64.79 % phosphorus), and alginate (79.52 %) every two weeks demonstrates a low-carbon resource recovery in RAS.