Cultivating microalgae in wastewater offers various advantages, but it still faces limitations such as bacteria and other impurities in wastewater affecting the growth and purity of microalgae, difficulty in microalgae harvesting, and extracellular products of microalgae affecting effluent quality. In this study, a novel dialysis bag-microalgae photobioreactor (Db-PBR) was developed to achieve wastewater purification and purer bioresource recovery by culturing microalgae in a dialysis bag. The dialysis bag in the Db-PBR effectively captured the microalgae cells and promoted their lipid accumulation, leading to higher biomass (1.53 times of the control) and lipid production (2.50 times of the control). During the stable operation stage of Db-PBR, the average soluble microbial products (SMP) content outside the dialysis bag was 25.83 mg L−1, which was significantly lower than that inside the dialysis bag (185.63 mg L−1), indicating that the dialysis bag effectively intercepted the SMP secreted by microalgae. As a result, the concentration of dissolved organic carbon (DOC) in Db-PBR effluent was significantly lower than that of traditional photobioreactor. Furthermore, benefiting from the dialysis bag in the reactor effectively intercepted the microorganisms in wastewater, significantly improving the purity of the cultured microalgae biomass, which is beneficial for the development of high-value microalgae products.