Shannon was originally a Whig in politics, but later supported the Free Soil wing of the Democratic Party, serving as a member of the California Central Committee in 1860. He subsequently switched to the Republican Party. He was a member of the California State assembly in 1859, 1860, and 1862, representing Plumas County. He supported black testimony in the California courts in 1862 and 1863, a position the Democrats unsuccessfully used against him as an issue in his third campaign for the Assembly and his subsequent campaign for Congress. Running as a supporter of Senator
John Conness, Shannon was elected as a Republican to the Thirty-eighth Congress (March 4, 1863 – March 3, 1865), in which he served as chairman of the Committee on Expenditures in the Department of the Interior. As a congressman he participated little in debate, but voted consistently for administration measures. Due to political turmoil in California over Conness, Shannon was not a candidate for reelection in 1864. He was selected as a California Congressional delegate for the Lincoln funeral, in which capacity he participated in speeches delivered outside the capital building in Columbus, Ohio. ==Later career==