One of the most robust findings on political institutions is that compulsory voting (CV) reduces the participation gap between poorer and wealthier voters. We present evidence that in Brazil, the largest country to use such a rule, CV increases inequality in turnout. We use individual-level data on 140 million Brazilian citizens and two age-based discontinuities to estimate the heterogeneous effects of CV by educational achievement, a strong proxy for socioeconomic status. Evidence from both thresholds shows that the causal effect of CV on turnout among the more educated is at least twice the size of the effect among those with less education. To explain this result, which is the opposite of what is predicted by the existing literature, we argue that nonmonetary penalties for abstention primarily affect middle- and upper-class voters and thus increase their turnout disproportionately. Survey evidence from a national sample provides evidence for the mechanism. Our results show that studies of CV should consider nonmonetary sanctions, as their effects can reverse standard predictions.