I study the link between ethnic diversity, democracy, and corruption. In a static model, I show that contrary to conventional wisdom, corruption might emerge as a negative externality of democracy. This occurs through ethnicity, which appears as a rent-extracting technology in a democratic society. Extending the model into a dynamic framework, I find that this technology of extraction operates only at the early stage of democracy. Its impact tends to phase out as democracy matures. In other words, the model predicts that democracy exhibits a threshold effect on corruption.