what model-year MacBook Pro ? is this a MagSafe connection to the computer?
there are cases where the wires in the MagSafe end can get twisted so badly that they short together, causing excessive heating in the MagSafe end while charging.
In that case, replacing the power adapter Cable (for some models) or power adapter, Complete (for non-modular models) -- with the same model or LARGER (never smaller) will generally solve the issues. Isopropyl alcohol will often remove any residual deposits, but your Apple-Owned store can advise for free if you make a Genius Bar appointment.
NB> "Regular" store personnel would love to advise you, but remember they are not TRAINED in these issues. Whether their advice is helpful is wildly variable.