With WWII already begun in Europe and Asia, Congress narrowly passed the first peacetime draft in U.S. history.
President Franklin Delano Roosevelt signed the Selective Training and Service Act into law in September 1940.
All males of ages 21 to 36 were required to register for the draft.

The Act expired in March 1947, but President Harry S. Truman pushed for an extension of the draft and Congress reenacted the Selective Service Act in June 1948. Experiencing an overload of volunteers, the Selective Service System implemented a “draft holiday” in early 1949 with expiration due in June 1950.

With the onset of the Korean war in June 1950, Congress extended the act for another year. This time all males aged 18-26 were required to register for the draft. The Act was reauthorized in 1951 as the Universal Military Training and Service Act.

During the Korean War > 1.5 million men were inducted into the armed services. An additional 1.5 million were inducted between 1954 and 1961.

Source: Encyclopedia Britannica