James Cantey helped form and was elected colonel of the 15th Alabama Infantry Regiment in 1861, in which he organized "Cantey's Rifles". In 1862, he led the regiment in Stonewall Jackson's Valley Campaign. At the First Battle of Winchester, on May 25, 1862, Cantey's regiment fought in Brigadier General Isaac Trimble's brigade of Major General Richard S. Ewell's division and helped turn back the Union Army advance. At the Battle of Cross Keys, the 15th Alabama Infantry was nearly cut off from the main force but fought their way back. Later, as part of Trimble's attack, the 15th Regiment Alabama Infantry helped flank the Union force and drive them back.