Aloe vera is an important commodity plant which has been traditionally used for the treatment of various diseases. This study investigated the use of extracted bioflocculant from Aloe vera for the treatment of textile wastewater. The bioflocculant was extracted, purified and characterized using GC-MS, FTIR, SEM, AFM, EDX and XRD analysis. It was mainly composed of carbohydrate (19.5%) and protein (6.0%). Box-Behnken design (BBD), using 3 level-3 variables, was employed to enhance the decolorization process by optimizing the effect of various factors. A significant enhancement from 62.50 ± 0.1 to 82.01 ± 0.8% in decolorization of wastewater was observed under optimized conditions viz. bioflocculant dosage (60 mg/L), pH (5.0) and contact time (180 min). A quadratic polynomial model was adequate beside the actual statistics at an R2 value of 0.99 for the response decolorization % and was in good agreement with the predicted value (82.01 ± 0.1%) obtained by the RSM model. The results of the present investigation demonstrated that Aloe vera mucilage can serve as a promising bioflocculant with high removal efficiency for solids, colour and dye from wastewater. To the best of our information, this is the first report on the use of Aloe vera mucilage as a natural bioflocculant for the treatment of dye-bearing wastewater.