Global climate change linked to the accumulation of greenhouse gases has caused concerns regarding the use of fossil fuels as the major energy source. To mitigate climate change while keeping energy supply sustainable, one solution is to rely on the ability of microorganisms to use renewable resources for biofuel synthesis. In this Review, we discuss how microorganisms can be explored for the production of next-generation biofuels, based on the ability of bacteria and fungi to use lignocellulose; through direct CO2 conversion by microalgae; using lithoautotrophs driven by solar electricity; or through the capacity of microorganisms to use methane generated from landfill. Furthermore, we discuss how to direct these substrates to the biosynthetic pathways of various fuel compounds and how to optimize biofuel production by engineering fuel pathways and central metabolism.