In the Missouri Compromise, to maintain the balance between free and slave states, Missouri entered the Union as a slave state, and Maine entered as a free state, and slavery was banned north of 36º30'N latitude in the unorganized territory of the Louisiana Purchase.
What happened in the Missouri Compromise
Missouri as a Slave State: Missouri was admitted to the Union as a slave state, which meant that slavery was legally allowed within its borders.
Maine as a Free State: To balance the admission of Missouri as a slave state, Maine was admitted to the Union as a free state. This was aimed at preserving the equilibrium between free and slave states in the Union.
Slavery Restriction Line: A line was established at 36º30'N latitude across the Louisiana Territory (part of the Louisiana Purchase). North of this line, slavery was prohibited in the unorganized territories, while south of the line, it was allowed. This was an attempt to address the issue of whether new states formed from the Louisiana Territory would allow slavery.