It is a relatively common problem with laptops, due most of the time to dust and thermal grease drying out. That is, of course if your fan is still running (it may have simply died).
This is due to the small hot air exhaust ports, and the small capacity of the fan /heat sink to dissipate the heat on laptops, because of the limited space available. The copper heat sink catches dust with time, and kills the ability to evacuate the heat from the laptop. Worsening the problem is the fact that all manufacturers save pennies and use the cheapest thermal paste, that is a critical component in the CPU / heat sink / fan combination.
The problem is even worse in case you have a discrete video card.
I've had the problem occasionally on my Lenovo W500, and one of the reason I loved Lenovo is they are designed to be (relatively) easily disassembled and repaired buy the user.
The cure is to stripe your laptop, remove the heat sink / fan assembly, clean it and replace the thermal grease with a good one (about the size of a grain of rice). I highly recommend the Prolimatech Thermal Compound, that can help reduce the CPU temp by 4 to 5 °C. Reassemble, and everything should be fine for a couple more years.
A good way to test it before is to see if this happens when your laptop shuts down only when plugged on the AC. When running on the battery, the CPU throttles down, and the temperature is much less.