what happened there is what happens when you use a cheap, 15amp NON SPEC RATED receptacle for a continuous duty load.
the wires made a poor connection to the receptacle, they probably vibrated loose over time from inrush current and continuous duty loads.
this made them either get hot and melt, when you pulled the plug it caused the hot wire to short out to ground, either in the outlet box or against the frame of the receptacle or the neutral or gnd.
take that receptacle out of the wall and inspect the wiring to make sure it is still usable. if it is not you will have to cut off whats bad and use wirenuts to make a jumper to the new receptacle you need to go buy.
go to hd, a hardware store, whatever, and get a 20AMP SPEC GRADE (that SPEC GRADE means something, and is important!!!).
connect the wires to the new receptacle. DO NOT NOT NOT NOT 'backstab' or use the small holes in the back of the receptacle to connect the wire. strip each wire back about one inch and WRAP IT AROUND the screw on the side of the pluh, WRAP TO THE RIGHT< OR CLOCKWISE, not to the left... then tighten the screw down. if you wrap it backwards the wire will slip off as you tighten the screw...
your lucky you were home and awake when that happened man.
very lucky!
seriously, count your blessings... i lost a house to fire once in the middle of the night... no fun