Canby attended Wabash College, but transferred to the West Point. He graduated in 1839, ranked 30 out of 31 in his class. He was commissioned a 2nd lieutenant in the 2nd U.S. Infantry and served as the regimental adjutant in the Seminole War and the Mexican War. During the Mexican War, he received 3 brevet promotions, including to major for the battles at Contreras and Churubusco and Lieutenant Colonel for Belén Gates.
At the start of the Civil War, Canby was in command of Fort Defiance, New Mexico Territory. He was promoted to Colonel of the 19th U.S. Infantry on May 14, 1861, and the following month commanded the Department of New Mexico. He prevented Confederate Brigadier Gen. Henry H. Sibley from reaching Colorado and California and defeated him in the decisive battle of Glorieta Pass, sometimes called the "Gettysburg of the West." He was promoted to Brigadier General immediately following this victory.
Canby spent a good part of 1863 in New York City, where he commanded troops at the Draft Riots in July and then as the Assistant Adjutant General in the Office of the Secretary of War until May of 1864, when he was promoted to major general. He returned to the West to command the Military Division of Western Mississippi. He was wounded in the hip and groin from a sniper while aboard the gunboat USS Cricket on the White River, Arkansas, on November 8, 1864. He commanded the Union forces at Fort Blakely, which led to the fall of Mobile in 1865. He accepted the surrender of Lieutenant Gen. Richard Taylor, the last Confederate army in the field, on May 1865.
After the war, Canby served as commander of the Army and Department of the Gulf, the Department of Louisiana and Texas, the Department of Washington, and the 2nd and 5th Military Districts. In 1873, he was sent to California to fight in the Modoc War. The Modocs, entrenched in Captain Jack's Stronghold south of Tule Lake, resisted army attacks so effectively that a peace conference was arranged. Canby was shot twice in the head and killed by Captain Jack, chief of the Modocs, on April 11, 1873, at Van Bremmer's Ranch, Siskiyou County, California. He was the first, and only, general killed during the Indian Wars. He is buried in Crown Hill Cemetery, Indianapolis, Indiana.
In recognition of his assassination, Canby's Cross monument was erected in Lava Beds National Monument.
Colonel - May 14, 1861
Brigadier General - March 31, 1862
Major General - May 7, 1864
Assistant Adjutant General in the Office of the Secretary of War