If the shutting down is 100% due to the heating then most likely yes.
I'm going to make some guesses and say that it's an old(er) laptop with tons of crap on it.
As previously stated in the thread, it sounds like the fans have too much dust. A common symptom and easier identifier is the noise. Is your laptop extremely noisy from the fans? Does it almost sound like a jet? This is harder to clean on a laptop so if you decide to do this yourself then
I HIGHLY recommend backing up all your important data (which should be done anyways). A can of compressed air or an electric air compressor such as
this one. It was the first one I found so don't kill me if you find a better/cheaper one. And trust me, it's worth it to get an electric air compressor because those cans are
expensive. Another tip if you decide to use compressed air, have a vacuum cleaner ready to suck up the dust, that stuff gets
everywhere. If you have someone who can help, have them vacuum the dust right out of the air while it's floating down. Please do not vacuum your computer, the static discharge from the vacuum can and likely will destroy it.
How frequently does it shut off? If it is very frequently (every 5 minutes to an hour depending on usage), you might have the fans disabled or otherwise misconfigured in the BIOS (or UEFI). This is more unlikely but still possible, especially if you haven't used the laptop in a very long time.
One thing that may not be completely obvious but still contributes to unnecessary heat is unnecessary load. Do you have a ton of crap running in the background? Do you have stuff running that you aren't actually using? Even while individually this junk might not have much of an impact, enough of it will slow the machine down and cause thermal issues. Try turning off Bluetooth and unplugging stuff you're not using. For cleaning up software, take a look at these programs which do a very good job of dealing with the basic stuff.
http://www.bleepingcomputer.com/download/rkill/
http://www.bleepingcomputer.com/download/adwcleaner/
https://www.malwarebytes.org/antimalware/