The growing concern with environmental problems related to the use of nonbiodegradable petroleum-based surfactants, which are ecotoxic and dependent on the petrochemical industry (finite source), instigates the study of surfactants of microbial origin (biosurfactants), as to surfactin. In relation to the global costs to obtain biosurfactants, the production and recovery of biosurfactant are still the major obstacles that prevent the application of these compounds on a large scale. The recovery process of the biosurfactants represents approximately 60% of the costs of production, while the medium of culture between 30-50%. In this way, alternatives to reduce production costs (culture medium and purification techniques) in order to make the production of biosurfactants economically feasible on industrial scale are pursued by researches and industry. In this context, one of the most promising strategies is the use of agro-industrial residues as a culture medium associated with filtering systems (purification); for example, cassava wastewater (CWW) a residue from cassava flour production, that can be used for the production of surfactin and associated with the ultrafiltration process. Therefore, this strategy (CWW + ultrafiltration) represents an alternative for the production and purification of surfactina in a potentially viable and economical way. However, the use of cassava wastewater as a culture medium hampers the process of ultrafiltration (fouling and/or polarization in the membrane), mainly due to the proteins of the cassava wastewater itself as well as those inherently synthesized by the microorganism producing biosurfactant. Therefore, this work aims to evaluate the effect of different treatments in cassava wastewater for proteins removal, as well as the effect of these treatments on the production and purification (ultrafiltration) of surfactin. The treatments used to remove the proteins were: HCl pH2 and HCl pH3, (NH4) 2SO4 and C2HCl3O2 (TCA). The CWW treated with (NH4)2SO4 and C2HCl3O2 (TCA) did not allow the growth of Bacillus subtilis LB5a and consequent production of surfactin. On the other hand, treatments with HCl pH2 and pH3 presented a 749.80 mg/L and 625.82 mg/L production with 72 hours of fermentation, higher productivity values than the control (cassava wastewater without treatment) -598.56 mg/L. Considering the results of the previously experiments only the HCl pH2 treatment was subjected to ultrafiltration purification. The ultrafiltration step consisted of two steps with membranes of 100 and 50 kDa, respectively. The two-ultrafiltration steps provided a recovery of greater than 72% and purity of 51.49%. Therefore, it was possible to observe that the handling of the cassava wastewater with HCl pH2 increased the surfactin production and enabled the ultrafiltration of the surfactin directly from the culture medium presenting with good yields of recovery and purity.