Actually, there were very few instances of black soldiers fighting for the Confederacy. Most of the black men who followed the Confederate troops were slaves of the soldiers, so in some cases, they did participate in minor ways: Cooking food, washing clothes, and doing other chores for his master. It was frowned upon for a slave to have possession of a gun, though some trustworthy slaves were allowed to hunt with a musket or rifle. One of the Confederacy's greatest battlefield commanders, Major General Patrick Cleburne, did suggest in writing that the Confederacy arm its slaves and put them into action against the enemy troops. Cleburne recognized the dwindling human resources in the South, and he thought (possibly correctly) that this would be a last chance of saving the floundering new country. His proposition was roundly dismissed, unsurprisingly, and Cleburne was later passed over several times for promotion to corps command. Cleburne was later killed at the forefront of his division at the disastrous Battle of Franklin.
Black Union troops numbered well over 100,000 by the end of the war, but many of them were used for guard duty and other unglamorous work. They were not well-liked by the white troops, and their courage and military know-how was questioned. However, during the final year of the war, black troops played a major part in several operations. At the Battle of the Crater, a large number of black troops were sent into the gaping hole that resulted from an underground explosion, where they were trapped when Confederate reinforcements arrived. The enraged Southerners, seeing thousands of black troops where their lines formerly stood, slaughtered them unmercilessly. The 54th Massachusetts Volunteer Infantry Regiment, perhaps the most famous black outfit in the war, was memorialized in the movie Glory! The regiment made a suicidal frontal assault on Fort Wagner, N.C. late in the war, but their attack was repulsed at great loss.