Remember that the voltage on an inductor is L*di/dt. When you turn on the FET and apply the 12 volts, the current increases, depending on the inductance. If it was possible to change the current in the inductor to zero instantaneously, the di/dt would be infinitely large, as would the voltage.
In your case, your current path is back into the power supply, which apparently cannot sink this current. Instead your voltage rises to the breakdown voltage of the IRF520. Your polarized capacitor will conduct when reverse biased, so it doesn't help in your circuit.
What you need is a large enough capacitor from 12V to ground to absorb this current to limit the voltage rise, or a snubber with a resistive element or transzorb to dissipate this energy. I might start by placing your 3900uf capacitor between 12 volts and ground as near to the motors as you can, and add a 1uF ceramic in parallel to handle the high frequency component.
Good luck!