Incubus said it well.
It's possible you had some shorting between the leads of the ESC, but it was thin enough that it burned through in a flash of sparks, and then ceased to be a short.
Clean and inspect the area.
You may want to ensure your solder joints are good. Redo the joints usng good solder and flux.
If you still have issues, you may need a larger wire and connector.
It's a balancing act of size to current carry ability in RC, many straddle the line at slightly too small for the current, and you will get some heat. It can feel pretty warm to hot. Not ideal, but monitor it to ensure its not too hot, if you can not hold it with bare fingers for 10+ seconds, it's too hot probably.