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 adpater. Make sure the apdapter outputs correct voltage. It’s possible that the outup voltage is not correct and the laptop shuts down to prevent the damge. Test your laptop with anohter known good power adapter.
If the problem still exists, even after replacing the adapter, most likley it’s the motherboard failure. Replace the motherboard.