In 1861, Canby was appointed as colonel of the 19th U.S. Infantry in command of the Department of New Mexico. He was defeated at Valverde and forced the Confederate retreat at the Battle of Glorieta Pass on March 28, 1862. Subsequently, he was promoted to brigadier general and sent to the East. He served in a staff position during the draft riots of 1863 in New York City before he was promoted to major general. He was put in command of the Western Mississippi, in which capacity he succeeded in the capture of Mobile with the assistance of the U.S. Navy. After the war, Canby served until his death in negotiations with the Modoc Indians.