At the Siege of Petersburg in June 1864, African Americans worked on digging trenches and other manual labor on behalf of the Confederacy, while African Americans fought in the Union Army of the Potomac as soldiers of the United States Colored Troops.
At the beginning of the American Civil War, Virginia had a black population of about 549,000. This meant that of the Confederacy's total black population one in six blacks lived in Virginia. Of those African Americans in Virginia 89% were slaves. In Petersburg about half the population was black of which nearly 35% were free. Petersburg was considered to have the largest number of free blacks of any Southern city at that time. Many of the freedmen prospered there as barbers, blacksmiths, boatmen, draymen, livery stable keepers, and caterers.
When Petersburg became a major supply center for the newly formed Confederacy and its nearby capital in Richmond, both freedmen and slaves were employed in various war functions. One of which was working for the numerous railroad companies that operated in and out of the city. In 1862 Captain Charles Dimmock used freedmen and slave labor to construct a ten-mile long defensive line of trenches and batteries around the city.
Once the siege began in June 1864, African Americans continued working for the Confederacy. In September 1864, General Robert E. Lee asked for an additional 2,000 blacks to be added to his labor force. On January 11, 1865 General Robert E. Lee wrote the Confederate Congress urging them to pass pending legislation to arm and enlist black slaves in exchange for their freedom. On March 13, the Confederate Congress passed legislation to raise and enlist companies of black soldiers. The legislation was then promulgated into military policy by Davis in General Order No. 14 on March 23, 1865. The emancipation offered, however, was still reliant upon one's master agreement; "no slave will be accepted as a recruit unless with his own consent and with the approbation of his master by a written instrument conferring, as far as he may, the rights of a freedman".