Most industries in the world treat their wastewaters with a conventional coagulation–flocculation process using alum as coagulant, polyacrylamide (PAM) as flocculant and lime as coagulant aid. To reduce the use of chemical products in the process, experiments were conducted to substitute the PAM with cactus juice (CJ) as flocculant. From the obtained data, it was concluded that the substitution of PAM with CJ in the coagulation–flocculation process was very effective, compared with PAM. Depending on the wastewater's origin, the bioflocculant showed removal efficiencies of 83.3–88.7% for suspended solids (SS) and 59.1–69.1% for chemical oxygen demand (COD). Lime addition enhanced the coagulation–flocculation process in the presence of CJ similarly to the PAM with efficiencies greater than 90% for both SS and COD. The CJ powder's infrared (IR) spectrum showed the main functional groups present in PAM. It was concluded that CJ as a flocculant fits well with the definition of sustainability and it is appropriate for countries that have regions where cactuses grow naturally.