I can't devote my life to explaining endlessly facts which you should already know. For starters, read "Look Away" by William C. Davis.
Could the South Have Won?
NY Books ^ | June 2002 ed. | James M. McPherson
Posted on 05/23/2002 11:52:25 AM EDT by stainlessbanner
"More active efforts in Virginia came form other quarters, like the fifty free blacks in Amelia County, and two-hundred more in Petersburg who offered themselves to the government to perform labor or even to fight under white officers. Slaves like a Tennessee barber named Jim donated money from their small savings to help raise companies; a Montgomery slave subscribed $150 of his own to the first call for loans from Secretary of the Treasury Christopher Memminger; not far from Mobile sixty slaves on one plantation practiced drilling every night after a full days' work, expressing their hope to fight the "damned buckram abolitionists" who had caused the crisis that now led to the fear of slave uprisings and the consequent curtailment of their few little freedoms."
-Look Away! William C. Davis
Davis goes on to say their motives and support varied. Some freedmen were in it for the business, using their skills as blacksmiths and masons, to earn money. Others were caught up in the excitement of the times, looking for adventure. Still others realized that although the might be near the bottom of the social order, it was still their state and they ought to defend it. Others had hopes of freedom if their patriotism was displayed during this time of crisis.
There are many good accounts of blacks in the Confederacy - lots of research is being done.