If I understand the issue with your laptop correctly, it shuts down by itself while it's on, right? Please do try these troubleshooting steps that may help.
- First do 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 up again.
- If it will still shutdown by itself, remove the battery (if it can be remove) the connect just the AC adapter and observe if the same problem will happen.
- If the battery cannot be removed, just connect the AC adapter and observe it again if it will still shutdown by itself.
- The problem may lie with the battery itself if the laptop will stay on while it's connected to its charger.
- But if all these steps will not help and will result to the same problem do contact Lenovo for a repair since it should still under the factory warranty.