Hi,
Here are some troubleshooting steps that may help in solving the issue.
- Start by removing the battery off the laptop then boot it up with just the charger connected and see if it will stay on or not.
- If that laptop will stay on with just the charger connected that means the problem can be the battery.
- If it does shut down still with just the charger connected do try a different charger first then see if it will do the same.
- When it stays on with a different charger that means you'll need to replace it.
- If using a different charger will result with the shutting down issue proceed with opening your laptop and clean the inside of it.
- Clean the dust off the cooling pads and do also apply new thermal paste on the CPU.
- While the laptop is opened do also reseat the RAM's, remove them all for couple of seconds then put them back in making sure everything is seated properly.
- If all these troubleshooting guides will not work then the problem is with the motherboard.