After Captain Jonathan Archer of the Enterprise had restored a damaged timeline in 1944/2154, a scene from the American Civil War could be seen in the time stream as the timeline realigned itself; the scene showed Confederate cavalry attacking a Union Army artillery position during an otherwise unidentified engagement. (ENT: "Storm Front, Part II")
General Robert E. Lee and Lieutenant General Stonewall Jackson were among the most successful military leaders of the Confederate Army. The Army also captured the US Navy ship Merrimack, which was renamed CSS Virginia. (TOS: "The Cage")
During the Q Civil War in 2373, the side led by Colonel Q, advocating a status-quo within the Q Continuum, appeared as soldiers of the Confederate Army when presenting themselves to "lower" species, while the side led by Q appeared as soldiers of the Union Army. (VOY: "The Q and the Grey")
In a deleted scene from the Star Trek: The Next Generation fourth season episode "Family", the hologram of Jack Crusher stated that one of Wesley's ancestors fought and died for the Confederacy at Bull Run, and which historically could have been either the First or the Second Battle of Bull Run, both Confederate victories and in the former Confederacy itself usually referred to as the "Battle(s) of Manassas". The deleted scene is included on the 2013 TNG Season 4 Blu-ray release.