In April 1861 Sanborn was appointed as the state's Adjutant General. His duties included overseeing the organization and equipping of three regiments of volunteer infantry for the fledgling Union army. He became the colonel of the 4th Minnesota Infantry in December 1861. The regiment had been mustered into Federal service by companies at Fort Snelling between October 4 and December 23. Sanborn and his men moved to Benton Barracks in St. Louis, Missouri, on April 23, 1862. Sanborn led the 1st Brigade, 7th Division of the Army of the Mississippi in Maj. Gen. Henry Wager Halleck's Siege of Corinth, Mississippi, from May 18 to May 30, the Battle of Iuka, September 19 and then in the Second Battle of Corinth, Oct 3-4 of that year.