We study how electoral incentives affect how politicians allocate their effort. To do so, we compile a new dataset containing roughly 780,000 bills, combined with more than 16 million roll-call voting records for roughly 6,000 legislators serving in U.S. state legislatures with term limits. Using an individual-level difference-in-differences design, we find that legislators who can no longer seek reelection sponsor fewer bills, are less productive on committees, and are absent for more floor votes, on average. These effects are largest for legislators who never seek office again in the future, and are concentrated in states with high legislative salaries. Studying four states which provide estimates of the budget impact of specific bills, we also find that term-limited legislators are no more fiscally responsible, contrary to theories of myopic electorates and political business cycles. Taken together, the evidence suggests that electoral incentives influence how legislators allocate effort in important ways.