King's military career began as a teenager when he was a mounted orderly for the Iron Brigade during the Civil War. After an appointment to West Point by Abraham Lincoln, he graduated in 1866 to receive his commission in the U.S. Army. In 1871 he joined the 5th Cavalry in Nebraska, the same unit for which William F. "Buffalo Bill" Cody was chief scout. He and Cody became friends and remained so for the rest of their lives. Under the command of Gen. George Crook, the 5th Cavalry was active in the plains warfare before being sent to Arizona Territory. There he fought in battles with various groups of Apaches, sustaining a severe bullet wound which shattered his upper right arm. After the initial recovery from his wound he joined the 5th Cavalry in 1875 just in time to travel north to participate in the Great Sioux War. There he led units of the 5th Cavalry in the 1876 fight on Warbonnet Creek, and was thus witness to William Cody's famous duel with the Cheyenne warrior Yellow Hand. Later King also served in the Nez Perce Indian Campaign of 1877 when the army was attempting to find and defeat Chief Joseph. In 1879 he was promoted to Captain, but had to leave active field service because of continuing difficulties with his wound. He then took on an assignment at the University of Wisconsin where he taught military science. Active with Wisconsin's volunteer regiments, he was again commissioned in the Spanish-American War as Brigadier General of Volunteers and was involved in that conflict, and later in the Philippines Insurrection. In 1904 he was made Brigadier General of helped train troops to fight in World War I. He was one of very few military officers to have served in all U.S. war efforts from the Civil War through World War I. At the time of his death in 1933, at age 89, he had authored at least 62 publications, most of which were historical romances set in either the Civil War, the Indian Wars, or the Spanish-American War.