Political career
Following admission to the Virginia bar, Mason practiced law in Virginia, and also operated a plantation in Frederick County. A partially illegible census record shows that he may have owned five slaves in 1830. In the 1850 federal census, Mason owned ten enslaved people, half of them children under ten years of age. In that year, he (or another man of similar name) also owned a 25-year-old Black woman and her four children in nearby Rappahannock County. In the 1860 census, Mason owned a 49-year-old Black man, a 35-year-old Black woman, and children aged 14, 13, 12, 10 and 3 years old. and he or another James M. Mason owned seven enslaved children (the eldest a 13-year-old girl) in southern Culpeper County.
Mason soon began his political career, well before his father's death, winning election several times as one of Frederick County's (part-time) representatives in the Virginia House of Delegates. His first term began on December 4, 1826, alongside one-term veteran James Ship, but only Ship won re-election the following year. In 1828, Ship failed to win re-election and Mason won the election to represent the gateway to the Shenandoah Valley together with William Castleman, Jr., and both won re-election the following year. After veteran legislator Hierome L. Opie, one of the four joint delegates of Frederick and neighboring Jefferson County to the Virginia Constitutional Convention of 1829-1830, resigned, Mason took his place alongside John R. Cooke, congressman Alfred H. Powell and fellow delegate Thomas Griggs Jr.
Although some had hoped that convention would limit slaveholder power, the resulting constitution only gave additional votes to western Virginians (including those in Frederick County and those counties which would secede and become West Virginia during the American Civil War), so Mason and Castleman were re-elected and joined by William Wood for the 1830–1831 legislative session.
In 1836, Congressman Edward Lucas of Shepherdstown (in what would become West Virginia decades later) announced his retirement. Voters in Virginia's 15th congressional district elected Mason as his successor in the Twenty-fifth United States Congress. The Jackson Democrat only served a single term, and was succeeded by Lucas' brother William Lucas.
In 1847, Virginia legislators elected Mason to the Senate after incumbent Isaac S. Pennybacker died in office, and Mason won re-election in 1850 and 1856. Mason famously read aloud the dying Senator John C. Calhoun's final speech to the Senate, on March 4, 1850, which warned of the likely breakup of the country if the North did not permanently accept the existence of slavery in the South, as well as its expansion into the Western territories. Mason also complained of Northern personal liberty laws, intended to help fugitive slaves: "Although the loss of property is felt, the loss of honor is felt still more."
Mason was President pro tempore of the Senate for two months in early 1857 (January 6 to March 3).