The purpose of the Missouri Compromise was to settle tensions between anti- and pro-slavery states. At the time, there were an equal amount of free and slavery states. Missouri was petitioning for statehood as a slave state, which would have upset that balance.
The compromise came in two parts. In 1820, Missouri was allowed to become a slave state. At the same time, Maine was granted statehood as a free state, therefore maintaining the balance. The second part of the compromise came in the form of an imaginary line across the Louisiana Territory, dividing the country into regions of free and slave states. The Missouri Compromise was repealed by the Kansas-Nebraska act of 1854, which allowed local choice regarding slavery.