[5] He was nearly expelled for bad behavior but pleaded for a second chance and ultimately graduated with honors in 1809.[6] Later that year, he moved to the state capital at Lancaster. James Hopkins, a leading lawyer there, accepted Buchanan as an apprentice, and in 1812 he was admitted to the Pennsylvania bar. Many other lawyers moved to Harrisburg when it became the state capital in 1812, but Buchanan made Lancaster his lifelong home. His income rapidly rose after he established his practice, and by 1821 he was earning over $11,000 per year (equivalent to $220,000 in 2021). He handled various types of cases, including a much-publicized impeachment trial, where he successfully defended Pennsylvania Judge Walter Franklin.[7]
Buchanan began his political career as a member of the Federalist Party, and was elected to the Pennsylvania House of Representatives in 1814 and 1815.[8] The legislature met for only three months a year, but Buchanan's service helped him acquire more clients.[9] Politically, he supported federally-funded internal improvements, a high tariff, and a national bank. He became a strong critic of Democratic-Republican President James Madison during the War of 1812.