When did slavery begin in the civil war?

It didn't.

It had died out earlier in the North, and the South was finding it harder to establish new slave-states. In other words, the South was trying hard to preserve a system that had outlived its time.