His first book, Legends of New England in Prose and Verse, was published in 1831. For the next thirty years until the Civil War, Whittier wrote essays and articles as well as poems that were concerned with abolition. In 1833 he wrote "Justice and Expedience" urging immediate abolition. In 1834 he was elected as a Whig for one term to the Massachusetts legislature. The following year he was mobbed and stoned in Concord, New Hampshire, for his beliefs. In 1836 Whittier moved to Amesbury, Massachusetts where he worked for the American Anti-Slavery Society. Later while working as the as editor of the Pennsylvania Freeman, in May 1838, the paper's offices were burned to the ground and sacked during the destruction of Pennsylvania Hall by a mob.
Whittier helped to establish the anti-slavery Liberty party in 1840 and ran for the U.S. Congress in 1842. In the mid-1850s he helped form the Republican Party, supported the presidential candidacy of John C. Frémont in 1856, and helped to found the Atlantic Monthly in 1857.