Virgil Earp had been just 18 years old when he enlisted in the Union Army when the War of Secession began in 1861. After the war ended, Virgil left the army and tried his hand at civilian life. In the 1870's, he spent some time in Dodge City, Kansas, before heading west to the New Mexico Territory. Although Virgil tried to convince his brother, Wyatt to come with him, he ultimately failed.
When the Second Mexican War began in 1881, Virgil Earp recived the brevet rank of Colonel, and was placed in charge of the Tombstone Rangers based out of Tombstone, New Mexico Territory. Being the senior rank he found himself in charge of a combined force of US Cavalry and Tombstone Rangers in the town of Tucson. His military career in the war was short lived as he led his regiment into a trap set jointly by the ConfederateTrans-Mississippi Department under Jeb Stuart and an Apache band led by Geronimo. In the ensuing battle, the combined militia and cavalry force was decimated. Earp was wounded and captured, and personally interrogated by Stuart.
Earp shared with Stuart his wish that his brother had come out west. His brother was the best poker player Earp had ever seen, and probably would not have fallen into the trap. Although beaten and humiliated, Virgil got the last laugh as he vexed Stuart by pointing out that the Apaches were the CSA's problem now.