When the Civil War began in 1861, most slaves in the South still labored in their masters' fields.
In the North, they weren't permitted to fight for the Union. A 1792 federal law forbade blacks to bear arms.
Congress passed two acts that allowed blacks to enlist. Black sailors were already serving in the Navy.
The following January - when President Abraham Lincoln issued the Emancipation Proclamation, freeing all slaves in territories held by the Confederates - he emphasized the importance of enlisting blacks into the Union's military.
"I will further declare and make known, that such persons of suitable condition, will be received into the armed service of the United States," Lincoln said.
The War of the Rebellion had become not only a fight to preserve the Union but a revolutionary struggle for the abolition of slavery.
Frederick Douglass, a former slave who became a leader in the abolitionist movement and a special adviser to Lincoln, said black soldiers would literally be fighting for their place in the country.
"Once let the black man get upon his person the brass letter, U.S., let him get an eagle on his button, and a musket on his shoulder and bullets in his pocket, there is no power on Earth that can deny that he has earned the right to citizenship," Douglass wrote.
By the end of the war, more than 200,000 black soldiers and sailors had fought for the Union.
In May 1863, the War Department established the Bureau of Colored Troops to manage the soldiers.
But getting permission to don the blue wool uniform would be only the first of many hurdles for the U.S. Colored Troops.
They weren't always treated as equals. All soldiers received the same rations, supplies and medical treatment, but the living conditions were generally worse for the colored troops than for their white counterparts.
The general casualty rate for the Union Army was about 13 percent. For black soldiers, it was 18 percent.
And they received lower pay. Black troops earned $7 a month, after a $3 clothing allowance was deducted from their salary. White soldiers received $13.
Douglass encouraged Lincoln to close the gaps, and in June 1864, Congress passed a law requiring equal pay for all soldiers.