President James Knox Polk (1845-1949) ran on a 4 point platform of reestablishment of an independent treasury, purchase of all or part of Oregon, reduction in tariffs, and acquisition of California from Mexico, and pledged that if he could accomplish them all, he would not seek a second term. He was able to attain all four goals, and kept his pledge not to run again.
This is why I personally rank him as the greatest President. While President's Washington and Lincoln faced much more Herculean tasks, neither of them were able to accomplish much else in their Presidencies, which isn't necessarily a bad thing given what they had to deal with. However, no other President has laid out such an ambitious agenda and succeeded in bringing it to fruition.
Just for trivia's sake, for his time, President Polk was the youngest man elected to the Presidency, is the youngest ex-President to die,and has the shortest retirement of any ex-President, succumbing to cholera only 103 days after leaving office in 1849.
Edit: I do not consider President Johnson to not have sought a second term; he withdrew from the race after only beating Senator Eugene McCarthy by about 7 points in the New Hampshire primary; at this point, Senator Robert Kennedy entered the race for the nomination, and President Johnson opted out of the race to concentrate on peace in Vietnam. Part of this withdrawl comes from the fact that his own internal polling showed he could not beat Senator Kennedy in a head to head matchup for the nomination.