Yes. And later when some Union officers beat some young black drummer boys in front of the black regiment they all got really upset, ran for their weappons, and yelled “Kill all the damn Yankees!”
In the real world, they were enlisted by Ben Butler into the Union Army and fought the rebels at Port Hudson.
Blacks in the rebel army were expressly forbidden by Confederate law until 1865. Sometimes, rebel officers dressed their manservant slaves in Confederate uniforms to have their pictures taken together, hence the photos that ecist today.