On March 3, 1863, the first US wartime military conscription bill was enacted. From the article:
"Congress passes Civil War conscription act
During the Civil War, the U.S. Congress passes a conscription act that produces the first wartime draft of U.S. citizens in American history. The act called for registration of all males between the ages of 20 and 45, including aliens with the intention of becoming citizens, by April 1. Exemptions from the draft could be bought for $300 or by finding a substitute draftee. This clause led to bloody draft riots in New York City, where protesters were outraged that exemptions were effectively granted only to the wealthiest U.S. citizens.
Although the Civil War saw the first compulsory conscription of U.S. citizens for wartime service, a 1792 act by Congress required that all able-bodied male citizens purchase a gun and join their local state militia. There was no penalty for noncompliance with this act. Congress also passed a conscription act during the War of 1812, but the war ended before it was enacted. During the Civil War, the government of the Confederate States of America also enacted a compulsory military draft. The U.S. enacted a military draft again during World War I, in 1940 to make the U.S. ready for its involvement in World War II, and during the Korean War. The last U.S. military draft occurred during the Vietnam War."