The pervasive contamination of ecosystems with active pharmaceutical ingredients poses a serious threat to biodiversity, ecosystem services and public health. Urgent action is needed to design greener drugs that maintain efficacy but also minimize environmental impact.