Does lawmaker behavior influence electoral outcomes? Observational studies cannot elucidate the effect of legislative proposals on electoral outcomes, since effects are confounded by unobserved differences in legislative and political skill. We take advantage of a unique natural experiment in the Canadian House of Commons that allows us to estimate how proposing legislation affects election outcomes. The right of noncabinet members to propose legislation is assigned by lottery. Comparing outcomes between those who were granted the right to propose and those who were not, we show that incumbents of the governing party enjoy a 2.7 percentage point bonus in vote total in the election following their winning the right to introduce a single piece of legislation, which translates to a 7% increase in the probability of winning. The causal effect results from higher likeability among constituents. These results demonstrate experimentally that what politicians do as lawmakers has a causal effect on electoral outcomes.