Explanation: For any non-Americans, the US Civil War was fought over slavery. The Union in the North, the original and democratically elected government of the US, was initially tepidly anti-slavery; while the secessionist Confederacy in the South was ardently pro-slavery - to the point where they openly and proudly declared that their 'country' was the first in world history founded on the 'fundamental truth' of white supremacy and the slavery of Black folk.
After some considerable hemming and hawing, as the Union itself was still deeply racist, the Union began to dedicate itself more distinctly to the cause of anti-slavery and pro-equality as the war dragged on, including the recruitment of free Black folk and former slaves into US military formations to fight the slaver scum.
While there was initial doubt amongst white racists in the North over whether Black folk even could fight effectively (showing just how deeply even the anti-slavery faction was still immersed in racism at this time), the USCT (United States Colored Troops), as these formations were known, performed exceptionally in combat - probably because they were fighting for freedom, and had a background wherein they were acutely aware of that fact, and silenced even their loudest initial doubters in the North.
Turns out, white supremacy is no protection against a good bayonet.