The modern world is highly dependent on energy. Biodiesel is recognized as a green and alternative renewable diesel fuel, and Brazil is the world׳s third largest producer of biodiesel, which in this country is mainly produced from soybeans. As the demand for biodiesel is increasing due to the increasing use of transportation fuel, it is advisable to look for other sources that would not need a vast cropland. Recently, microalgae have emerged as a source than can play the dual role of bioremediation of wastewater and generation of biomass for biodiesel production. This paper focuses on the feasibility of utilizing wastewater to cultivate algae for the production of biodiesel in Brazil. By using only domestic wastewater from 40% of Brazilian municipalities, the production of biodiesel would increase by 21.4%. Moreover, the use of wastewater treatment becomes an economically attractive alternative as the revenue from selling biodiesel overcomes the production costs by at least 10%. As a result, Brazil could easily increase its current biodiesel production and simultaneously amazingly improve its index of sanitation.