In 1864, York participated in the battles of the Wilderness and Spotsylvania Court House. He was promoted to brigadier general in May and assigned command of the combination of two depleted Louisiana brigades previously led by Harry T. Hays and Leroy A. Stafford. Serving in the division of John B. Gordon in Jubal A. Early's Army of the Valley, York fought in many of the battles and skirmishes in Early's Raid on Washington, including the Battle of Monocacy in Maryland. He was severely wounded in the Shenandoah Valley at the Battle of Opequon and incapacitated for any further field service.