Born on his grandfather's plantation, "Sylvia's Plain," in Washington County, Pennsylvania, near Wheeling, Virginia, Leffler attended the public schools and was graduated from Jefferson College,, in Canonsburg, Pennsylvania. After studying law, he was admitted to the bar and commenced practice in Wheeling. He served as a member of the Virginia House of Delegates from 1817 to 1819, 1823 to 1827, 1832, and 1833. He served as a member of the Virginia Board of Public Works in 1827. In 1826, Leffler was elected as an Adams Party candidate to the Twentieth Congress, defeating incumbent JacksonianJoseph Johnson. When running for re-election in 1828, he was beaten. Although Andrew Jackson defeated Adams, Leffler was defeated by Anti-Jacksonian Party candidate Philip Doddridge. In all, Leffler served in the U.S. House from March 4, 1827, to March 3, 1829. In 1835, Leffler moved to that portion of Michigan Territory that is now Burlington, Des Moines County, Iowa, in Iowa's southeastern corner. At the time, Iowa and the other regions of the Michigan Territory west of the Mississippi River were broadly divided between Des Moines County, in the south, and Dubuque County in the north. Leffler was admitted to the Des Moines County bar on April 15, 1835, and practiced law. While under Michigan's regional governance, he was named as the chief justice of the first judicial tribunal of Des Moines County on April 11, 1836. After the creation of Wisconsin Territory on April 20, 1836, he served in the first legislature of the new Territory from 1836 through 1838, and served as Speaker of the House during the 2nd session of the Assembly, in the winter of 1837-38. After Iowa Territory was created from areas of Wisconsin Territory west of the Mississippi River—previously referred to as the Iowa District—in 1838, he served as a member of the Iowa Territory house of representatives in 1841. President John Tyler appointed Leffler as United States marshal for the district of Iowa on December 18, 1843. He served until removed by President James K. Polk on December 29, 1845, when he resumed the practice of law in Burlington. He declined the appointment of the register of the land office at Stillwater in 1849. He was appointed by President Millard Fillmore as receiver of public sums of money for the Chariton land district of Iowa on August 30, 1852, and served on that position until removed by President Franklin Pierce on March 29, 1853. He died in Chariton, Iowa, on March 8, 1866. He was interred in Aspen Grove Cemetery, in Burlington.