Hi,
Here are some troubleshooting steps that may help in solving the issue.
- 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 try booting it back up.
- If these doesn't work reseat the RAM's, remove them all for couple of seconds then put them back in making sure everything is seated properly.
- If it will still shut down by itself, remove the battery of your laptop then try booting it back up with just its AC adapter.
- Next is to load in BIOS then observe if it will shut down.
- If it does stay on in BIOS your last option would be to reinstall Windows.
- If it doesn't stay on in BIOS then you may need to clean the inside of your laptop and apply new thermal paste on both the CPU and GPU.
- Finally if all these will not work then you'll need to contact Lenovo for a repair.