In 1861, Shelby joined the Missouri State Guard. He participated in the battles at Wilson's Creek and Pea Ridge. In April 1862 he followed the Missouri army into Tennessee. He later returned to Missouri to raise a cavalry regiment. He attached himself to General Sterling Price, involving himself in every campaign west of Mississippi. As a colonel, he served at the Battle of Prairie Grove and was wounded at Helena. He was appointed brigadier general in December 1863 in charge of the "Iron Brigade" of the west. He served until the end of the war.