Sugarcane vinasse is the byproduct of ethanol production and, in many places, its final disposition has been its application in cane fields through fertigation. However, the incorrect practice of this technique can result in soil acidification, increase of salinity, and contamination of groundwater. Appropriate technologies and treatment processes can enable the recovery of byproducts from sugarcane vinasse, such as water, nutrients and energy. Thus, this study studied the integration of nanofiltration (NF) and reverse osmosis (RO), to ultrafiltration (UF) and two-stage anaerobic membrane bioreactor (2S-AnMBR) treatment aiming at the recovery of energy, nutrients (NF/RO concentrate) and water (NF/RO permeate). Seven types of commercial nanofiltration (NF) / reverse osmosis (RO) membranes were evaluated. The 2S-AnMBR reduced the vinasse organic matter and potentially produced 4.9 Nm3 of CH4 m−3 of vinasse that can be used for energy purposes. The low-pressure RO membrane stood out among the membranes investigated in this study, demonstrating a good performance in terms of pollutants retention, fouling potential and specific energy consumption (SEC), with an optimal recovery rate value below 40 % at 12 bar of operation. The final RO treatment was a viable alternative to generate water for industrial reuse, allowing the production of 3.2–4.8 m3 of treated water per m3 of ethanol produced. Besides, the retentate produced by RO had an organic carbon concentration 9 times lower compared to raw vinasse, which reduces the impact during soil disposal and associated CO2 generation.