There was a series of attempts that occurred in order to prevent an eventual seceding from the southern states. However, they could not prevent further breakdown of relations between the north and south. As a result, the Confederacy decided to declare War on the Union in 1861.
A famous attempt of preventing the south to secede was The Missouri Compromise of 1820. An agreement reached by the states which abolished slavery throughout all territories up north of the state of Missouri. On the counterpart, slavery would remain legal in the southern states.