Why might female leaders of democratic countries commit more money, equipment, soldiers, and other resources to interstate conflicts than male leaders? We argue that gender bias in the process of democratic election helps explain this behavior. Since running for office is generally more costly for women than for men, only women who place a higher value on winning competitions will choose to run. After election, they also devote more resources to pursuing victory in conflict situations. To provide microfoundational evidence for this claim, we analyze data from an online laboratory game featuring real-time group play in which participants chose to run for election, conducted a simple campaign, and represented their group in a contest game if elected. Women with a higher nonmonetary value to winning were more likely to self-select into candidacy, and when victorious, they spent more resources on intergroup contests than male elected leaders. The data suggest that electoral selection plays an important role in observed differences between male and female leaders in the real world.