What follows is quoted directly from Wikipedia:
Term limits, or rotation in office, date back to the American Revolution, and prior to that to the democracies and republics of antiquity. The council of 500 in ancient Athens rotated its entire membership annually, as did the ephorate in ancient Sparta. The ancient Roman Republic featured a system of elected magistrates—tribunes of the plebs, aediles, quaestors, praetors, and consuls—who served a single term of one year, with reelection to the same magistracy forbidden for ten years. Many of the founders of the United States were educated in the classics, and quite familiar with rotation in office during antiquity. The debates of that day reveal a desire to study and profit from the object lessons offered by ancient democracy.
In 1783, rotation experiments were taking place at the state level. The Pennsylvania Constitution of 1776 set maximum service in the Pennsylvania General Assembly at "four years in seven." Benjamin Franklin's influence is seen not only in that he chaired the constitutional convention which drafted the Pennsylvania constitution, but also because it included, virtually unchanged, Franklin's earlier proposals on executive rotation. Pennsylvania's plural executive was composed of twelve citizens elected for the term of three years, followed by a mandatory vacation of four years.
On October 2, 1789, the Continental Congress appointed a committee of thirteen to examine forms of government for the impending union of the states. Among the proposals was that from the State of Virginia, written by Thomas Jefferson, urging a limitation of tenure, "to prevent every danger which might arise to American freedom by continuing too long in office the members of the Continental Congress. The committee made recommendations, which as regards congressional term-limits were incorporated unchanged into the Articles of Confederation. The fifth Article stated that "no person shall be capable of being a delegate [to the continental congress] for more than three years in any term of six years."
In contrast to the Articles of Confederation, the federal constitution convention at Philadelphia omitted mandatory term-limits from the second national frame of government, i.e. the U.S. Constitution of 1787 to the present. Nonetheless, due largely to grass roots support for the principle of rotation, rapid turnover in Congress prevailed by extra-constitutional means. Also George Washington set the precedent for a two-term tradition that prevailed (with the exception of Franklin Delano Roosevelt's four terms) until the 22nd Amendment of 1951.
However, when the states ratified the Constitution (1787-88), several leading statesmen regarded the lack of mandatory limits to tenure as a dangerous defect, especially, they thought, as regards the Presidency and the Senate. Richard Henry Lee viewed the absence of legal limits to tenure, together with certain other features of the Constitution, as "most highly and dangerously oligarchic." Both Jefferson and George Mason advised limits on reelection to the Senate and to the Presidency, because said Mason, "nothing is so essential to the preservation of a Republican government as a periodic rotation." The historian Mercy Otis Warren, warned that "there is no provision for a rotation, nor anything to prevent the perpetuity of office in the same hands for life; which by a little well timed bribery, will probably be done...."
The fact that "perpetuity in office" was not approached until the 20th century is due in part to the influence of rotation in office as a popular 19th century concept. "Ideas are, in truth, forces," and rotation in office enjoyed such normative support, especially at the local level, that it altered political reality.
James Fennimore Cooper, the novelist, described the common view that "contact with the affairs of state is one of the most corrupting of the influences to which men are exposed." An article in the Richmond Enquirer (1822) noted that the "long cherished" principle of rotation in office had been impressed on the republican mind "by a kind of intuitive impulse, unassailable to argument or authority."
Beginning about the 1830s, Jacksonian democracy introduced a less idealistic twist to the practice of limiting terms. Rotation in office came to mean taking turns in the distribution of political prizes. Rotation of nominations to the U.S. House of Representatives – the prizes – became a key element of payoffs to the party faithful. The leading lights in the local party machinery came to regard a nomination for the House as "salary" for political services rendered. A new code of political ethics evolved, based on the proposition that "turnabout is fair play." In short, rotation of nominations was intertwined with the spoils system.
In district nominating conventions local leaders could negotiate and enforce agreements to pass the nominations around among themselves. Abraham Lincoln was elected to the United States House of Representatives in 1846 under such a bargain, and he returned home to Springfield after a single congressional term because, he wrote, "to enter myself as a competitor of another, or to authorize anyone so to enter me, is what my word and honor forbid."
During the Civil War, the Confederate States constitution limited its president to a single six-year term.
The practice of nomination rotation for the House of Representatives began to decline after the Civil War. It took a generation or so before the direct primary system, civil service reforms, and the ethic of professionalism worked to eliminate rotation in office as a common political practice. By the turn of the 20th century the era of incumbency was coming into full swing.
A total of 8 presidents served two full terms and declined a third and three presidents served one full term and refused a second. After World War II, however, an officeholder class had developed to the point that congressional tenure rivaled that of the U.S. Supreme Court, where tenure is for life. "Homesteading" in Congress, made possible by reelection rates that approached 100% by the end of the 20th century, brought about a popular insurgency known as the "term-limits movement"