Dianavan says, If a slave became a soldier, it was probably the slave owner's decision. Believe what you will but I can't imagine a slave saying, "Master, will you let me become a soldier?
I can, because of the opportunity to run away or the opportunity to surrender and be sent to a prisoner-of-war camp in the North where the slave might hope he'd receive better treatment. However, for those reasons I can't imagine a slaveowner permitting his slave to go off-plantation and join the fighting, though obviously some few did, according to the statistics quoted here.