Shields immigrated to the United States from Ireland in 1826. He was a state legislator and supreme court judge in Illinois before being commissioned as brigadier general during the Mexican War. He was subsequently governor of the Oregon Territory (1848–49), and then a Democratic U.S. senator from, respectively, Illinois (1849–52) and Minnesota (1858–60) When the Civil War began he was living in California, and returned there after serving as an officer in the Union army. He moved to Missouri and was elected senator there in 1879. He remains the only American to have represented three states in the U.S. Senate.