The laptop shuts off when AC power adapter is plugged in. The laptop works fine on battery power but as soon as you connect it to AC adapter, the laptop turns off.
1. Power adapter failure.
2. Motherboard failure.
Possible troubleshooting steps and repair solution:
First of all, test the power adapter. Make sure the adapter outputs the correct voltage. It’s possible that the output voltage is not correct and the laptop shuts down to prevent the damage. Test your laptop with another known good power adapter.
If the problem still exists, even after replacing the adapter, most likely it’s the motherboard failure. Replace the motherboard.