Lyons was born in Hanover County, Virginia in 1801, and graduated from the College of William and Mary in 1819.
As an adult, Lyons made his law career in Richmond, Virginia. He was appointed Prosecuting Attorney there, holding that position for ten years.
Lyons was a member of the Virginia House of Delegates and the State Senate for many years, and was active in Whig Party politics, often a delegate to Whig National Conventions, and serving as Chairman of the Virginia Whig Party. He authored the Virginia Whig platform of 1840, pledging to oppose a National Bank and protective tariffs. Twice elected to the Virginia state Senate, when he resigned, he was elected to the House of Delegates.
In 1850, Lyons was elected to the Virginia Constitutional Convention of 1850. He was one of six delegates elected from the central Piedmont delegate district made up of his home district of Richmond City, and included Henrico, New Kent and Charles City Counties.
At Franklin Pierce’s campaign for President in 1852, Lyons joined the Democratic Party, becoming an outspoken advocate of States Rights. His interest in Southern affairs included service as the president of Virginia’s Agricultural Society.
At the beginning of the American Civil War, the Confederate representative-elect John Tyler died on January 18, 1862 before the Confederate Congress started, and Lyons was elected on February 10, 1862 to the House of Representatives to represent Virginia in his place. Lyons then served the state in the First Confederate Congress from 1862 to 1864. He also served on President Jefferson Davis' Counsel. During the war Lyons was appointed by the Confederate government as a judge to try political prisoners.
Following the reorganization of the Democratic Party of Virginia in 1872, Lyons was elected to be Chairman of the state organization meeting at Staunton, Virginia. The Convention nominated Charles O'Connor for President as a favorite of the Bourbon Democrats, but he declined, and it then nominated Lyons, and he too declined.
James Lyons died on December 18, 1882 in Richmond City, Virginia.