That has to be a wire put in by the previous owner. Stock wires wouldn't have those blue crimp on connectors. You'll have to trace it inside to see where it goes.
Wires melting means a short. Hot wire is going direct to ground, pulling so much current...it melts.