The use of biomass for renewable energy production is one alternative to reduce the environmental impacts of energy production worldwide. Sugarcane-based ethanol is one of the most widespread biofuels in the road transport sector and its development has been encouraged by strong incentives on production and use in several countries. The growing realization on the environmental impacts of ethanol production indicates the need to increase the efficient utilization of biomass resources by optimizing the production chain sustainably. This papers evaluates enhancements in the ethanol production chain quantitatively by identifying opportunities for agricultural intensification and for investments in advanced biorefineries in a least-cost optimization model. Results of our model show that significant cost and environemtal benefits can be achieved by modernizing sugarcane agriculture in Bolivia. Demands for ethanol and sugar can be met cost-effectively by increasing sugarcane yields from the current country-average of 55.34 ton/ha to 85.7 ton/ha in 2030 with a moderate cropland expansion of 14.4 thousand hectares in the period 2019-2030. Our results further suggest that it is cost-optimal to invest in current technological advancements in efficient cogeneration to maximize the renewable energy output and the economic benefits of sugarcane ethanol. Finally, biofuel support in the range of 8-10 US$/GJ is required for investments in second-generation ethanol to be cost-competitive in the medium-term.