The United States doubled in size because of the Louisiana Purchase in 1803. The Missouri Territory was part of the Louisiana Purchase. In 1817 settlers in the Missouri Territory applied to become a State.
At that time there were eleven free states and eleven slave states. This caused a big problem for Congress. The Missouri constitution allowed for slavery. By allowing Missouri to become a State, the balance would be upset.
When Congress was debating this issue, Maine applied for statehood. A senator from Kentucky named Henry Clay proposed a compromise. Missouri would be admitted as a slave state and Maine would be admitted as a free state. To get the support from the northern Congressmen, Senator Clay also suggested that slavery would be outlawed in any new territories north of the 36" 30" latitude mark, which was Missouri's southern border. This imaginary line through the Louisiana Territory is known as the Mason-Dixon line because they were the surveyors who
Most of Congress were happy with the plan and many people thought this would be the final solution to the slavery question. In 1820 the Missouri Compromise was passed and Missouri and Maine became states.
The twelve free states were: Maine, New York, Vermont, New Hampshire, Massachusetts, Connecticut, Rhode Island, Illinois, Indiana, Ohio, Pennsylvania, and New Jersey.
The twelve slave states were: Missouri, Kentucky, Virginia, Maryland, Delaware, Tennessee, North Carolina, South Carolina, Louisiana, Mississippi, Alabama, and Georgia.
Thomas Jefferson and John Adams weren't so sure this was the answer. The Missouri Compromise did not last long. See the Compromise of 1850.