Meeting Brazil’s ambitious national commitments on both climate change mitigation and biodiversity conservation depends on securing its reserves of forest carbon and biodiversity. Brazil’s ‘Forest Code’ is a key tool to reconcile environmental preservation and agricultural production; it limits deforestation and requires forest restoration in illegally deforested areas. However, not all provisions of the law’s 2012 revision have yet been implemented and some are facing new challenges. Using modelled land use change projections for the whole of the country, we show that full implementation and enforcement of the law has the potential to contribute to conserving biodiversity. Biodiversity outcomes will be especially positive if (i) deforested areas are restored in ways that support recolonization by native species and (ii) additional measures are implemented to protect native vegetation in areas like Caatinga dry forests and Cerrado savannas, which may experience added pressure displaced from other regions by Forest Code implementation.