Were swords used in the civil war?
Absolutely but you have to understand the context. I'm a Civil War reenactor and we study this closely. Swords were everywhere but they weren't the primary killing tool. An infantry officer might carry a sword but he'd likely use his revolver in actual combat. The sword was for commanding—waving it to direct movements—and for ceremony.
Cavalry still trained with sabers extensively and there are numerous accounts of saber fights especially in the early war. As the war progressed and repeating carbines became more common cavalry often dismounted to fight as dragoons (mounted infantry) making the saber less useful. By the end many cavalrymen saw the saber as outdated and preferred their breech-loading rifles. But they were still issued and used especially in Confederate cavalry which often had less access to modern firearms. So yes used but their era was ending.
From a tactical history perspective the Civil War marked the true end of the sword as a major battlefield weapon in Western warfare. The increased range accuracy and rate of fire of rifles (like the Springfield Model 1861) meant that closing to sword range was extremely deadly. A famous quote often attributed to a Union soldier goes something like "We don't fear the rebel yell but we do fear the rebel bullet."
That said swords had psychological impact. The sight of flashing sabers in a cavalry charge could break inexperienced troops. They were also crucial for officers to be seen by their men in the smoke-choked battlefield. Many swords from this period are beautiful works of art engraved with patriotic motifs. If you visit museums like the Smithsonian or look at National Park Service collections you'll see dozens of designs. So while not the star of the show they were definitely part of the cast.
Yes swords were used in the American Civil War (1861-1865) but their role had diminished significantly compared to earlier wars. By the 1860s rifles and artillery were the dominant weapons making the classic cavalry charge with sabers less effective and more suicidal. However swords still served important symbolic and practical functions.
They were primarily carried by officers (as a badge of rank and for signaling troops) cavalry troops (sabers for mounted charges) and artillery crews (short swords like the artillery short sword for close defense of cannons). The most common types were the Model 1860 Light Cavalry Saber (nicknamed the "Old Wristbreaker" for its weight) the Model 1850 Army Staff & Field Officer's Sword and various enlisted foot swords. While there were dramatic cavalry clashes with sabers (like at Brandy Station) most casualties were caused by firearms. Swords became more of a backup weapon or tool for discipline. The American Battlefield Trust has good info on Civil War weaponry.