The latest global assessment of the Intergovernmental Science-Policy Platform on Biodiversity and Ecosystem Services (IPBES) warns that biodiversity loss can make ecosystems more vulnerable to the effects of climate change and other stressors. Economic growth has been identified as one of the key drivers of these losses, however, the impact pathway may depend on how society organizes economic activity and distributes its benefits. Here we use a global country-level dataset to show how the strength of national institutions and economic inequality in society can mediate the loss of biodiversity worldwide. We find that the interplay of institutions and inequality fully mediates the impact of economic growth on plant biodiversity, but only partially mediates the impact on animal biodiversity. Furthermore, in sustaining biodiversity, the effectiveness of institutions depends on inequality in society, such that biodiversity loss is ameliorated when institutions are strong and inequality low, but in regions with high inequality, institutions tend to lose their efficacy. The analysis also uncovers nonlinearities in inequality, institutions, and biodiversity interactions, which are important to investigate further and consider for policy purposes.