Why outlets spark when unplugging - EMF & Inductors

I am trying to disconnect wires from battery to the voltage controller but caused strong spark, like an explosion and injured my fingers. How do I prevent from spark or explosion when disconnecting the wire?