Hello Samuel, and thank you for your interest in History Hub.
Since murder is usually a non-federal crime (unless the victim was a government worker, for example) murder was usually prosecuted by the local county court. The North Carolina State Archive is a good resource, and may be able to direct you to this court case. https://archives.ncdcr.gov/
It is worth noting though that the war did not begin until 1861, so if the court case occurred in 1859 there was no Confederate Army yet.
Since the nature of punishment was often in the judge's hands, though, finding an alternate source of service for a prosecuted crime could involve enlistment.
The National Park service has a helpful webpage for searching for soldiers on both sides of the conflict. https://www.nps.gov/civilwar/search-soldiers.htm
I hope this has been helpful in your research!