Hi,
First does it shut down even if it's connected to its AC adapter? Here are some troubleshooting steps that may help.
- Start by doing a hard reboot, remove the battery and unplug the AC adapter then press and hold the power button for 20 seconds then see if it would still shut down.
- Next is to test weather or not it will shut down while the battery is out and just connected directly to its charger.
- Also do test the AC adapter if it's supplying enough voltage to power the laptop or try another AC adapter and see if the same problem will persist or not.
- Just to make sure that it's not a overheating problem, clean the inside of the laptop and clean in making sure there's no dust on the fans and apply new thermal on both the GPU and CPU as well.
- If all these will not work that means it can be a hardware problem with it's motherboard.