At the turn of the twenty-first century, an important pair of studies established that greater female representation in government is associated with lower levels of perceived corruption in that government. But recent research finds that this relationship is not universal and questions why it exists. This article presents a new theory explaining why women’s representation is only sometimes related to lower corruption levels and provides evidence in support of that theory. The study finds that the women’s representation–corruption link is strongest when the risk of corruption being detected and punished by voters is high – in other words, when officials can be held electorally accountable. Two primary mechanisms underlie this theory: prior evidence shows that (1) women are more risk-averse than men and (2) voters hold women to a higher standard at the polls. This suggests that gender differences in corrupt behavior are proportional to the strength of electoral accountability. Consequently, the hypotheses predict that the empirical relationship between greater women’s representation and lower perceived corruption will be strongest in democracies with high electoral accountability, specifically: (1) where corruption is not the norm, (2) where press freedom is respected, (3) in parliamentary systems and (4) under personalistic electoral rules. The article presents observational evidence that electoral accountability moderates the link between women’s representation and corruption in a time-series, cross-sectional dataset of seventy-six democratic-leaning countries.