Since the beginning of the Civil War, a contentious topic in the North was whether African Americans should be allowed to serve in the Union Army (blacks had long been allowed to serve in the navy, although only in its lowest “ratings” or ranks).
Abolitionists naturally supported the idea of black soldiers because it gave African Americans not only a claim to freedom, but also to citizenship. In the nineteenth-century United States, the common understanding was citizenship brought duties as well as rights. And the most onerous duty of the citizen was military service. That is why in most states before the Civil War all adult men were technically members of the state militia well into middle age (even if in practice many men were exempted). Hence, if African Americans were allowed to serve in the Union Army they would have a powerful claim to both freedom and citizenship. This explains Frederick Douglass famous soundbite in July 1863, “Once let the black man get upon his person the brass letters US, let him get an eagle on his button, and a musket on his shoulder, and bullets in his pocket, and there is no power on earth or under the earth which can deny that he has earned the right of citizenship in the United States.”
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A racist cartoon ridicules the idea of black soldiers (October 1861)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
It was this realization, plus a belief in black inferiority, that explains the opposition to blacks as soldiers. There also was the legal argument that African Americans under the law were not authorized to serve as soldiers. Congress disposed of that justification with the Militia Act, which became law on July 17, 1862 (the same day as the Second Confiscation Act). The act famously stated, “the President be, and he is hereby, authorized to receive into the service of the United States, for the purpose of constructing intrenchments, or performing camp service or any other labor, or any military or naval service for which they may be found competent, persons of African descent, and such persons shall be enrolled and organized under such regulations, not inconsistent with the Constitution and laws, as the President may prescribe.” Of course, this law was predated by the black regiment organized by David Hunter in the Department of the South (which the War Department refused to recognize). Other black regiments would soon follow in Kansas, Louisiana, and Massachusetts. Before the year was out, in late October 1862, African-American soldiers of the 1st Colored Kansas Volunteers would battle Confederate guerrillas at Island Mound, Missouri.
The dark side of the Militia Act was it would be used to justify paying less to black than white soldiers, as the law stated: “That all persons who have been or shall be hereafter enrolled in the service of the United States under this act shall receive the pay and rations now allowed by law to soldiers, according to their respective grades: Provided, That persons of African descent, who under this law shall be employed, shall receive ten dollars per month and one ration, three dollars of which monthly pay may be in clothing.”
More positively, it solidified the claim to freedom of black men that served in the army and their families. The law stated:
While this provision might seem superfluous given the Second Confiscation Act, which freed the slaves of disloyal owners, it should be kept in mind that before the Emancipation Proclamation and the 13th Amendment any claim for slaves to freedom under the law was precious as any of them might have been reversed later by Congress or ruled unconstitutional by the federal courts. For that reason and for authorizing black enlistment as soldiers, the Militia Act of 1862 was a revolutionary piece of legislation and important milestone on the road to emancipation in the United States.
Source: http://www.history.umd.edu/Freedmen/milact.htm