What determined the status of slavery in territories in the 1850s?
Variegates from state to state
The intricate thing about the whole "slavery" issue, is how it was established. By the 1850's, as you know, there were several territories, such as the Kansas-Nebraska, New Mexico territory, (recall that the Old Northwest had been exempt from slavery early on). The way which they decided to tackle this issue, was to edict the concept of "popular sovereignty", which is an idea that essentially lets the public (living in the territory, of course), to vote on whether they think that implementing it is functional or not.
(P.S.) This ended up terribly, as both abolitionists and pro-slavery cliques flocked towards influencing the territories to go their way, which ended up in malice (corruption), murder, and the whole idea being a mess.