"But life is short and art is very long"
--Academical Lectures, 1838
Palfrey ran in 1849 for re-election on the Free Soil platform, but his district was too divided to give him the necessary majority. To some he was too conservative and to others too radical. After fourteen run-off elections, Palfrey finally withdrew.
The early 1850's were disappointing to his career as new coalitions changed the political scene. As the anti-slavery movement became stronger in Massachusetts and the new Republican party emerged, Palfrey was viewed with new regard. When Lincoln was elected, his friend Senator Charles Sumner secured him the appointment as Postmaster of Boston, a position he held until 1867. Taking this traditionally a patronage appointment, Palfrey ran his department with conscience. When budgets were cut, Palfrey eliminated middle-management positions and requested better pay for his clerks and carriers. As the war progressed, Palfrey shared in the economic prosperity in Boston and, for the first time in his life, he was free of financial worry. Both his sons served with distinction in the Union Army.
Much of his later life was taken up in the research for and writing of his History of New England. His work with early state records and a research trip to England in 1856 gave him excellent sources.
In 1873, the Palfrey's celebrated their fiftieth wedding anniversary, but a partial stroke soon curtailed his routine. By 1877 he had stopped his journal. On April 26, 1881, he died in his sleep.