This pattern usually points to a battery fault or a power connection problem inside the laptop: it works on AC power, but shuts off as soon as AC is removed.
Try these checks first:
- Use the original charger and cable if available.
For USB-C charging, make sure the charger is connected to the actual charging USB-C port, not through a hub or dock. - Check the charging connection.
- Reseat the charger firmly.
- If the laptop charges through USB-C, clean the USB-C port carefully with compressed air.
- A charger that is not compatible or not powerful enough can prevent proper charging.
- Perform a power reset.
- Disconnect the laptop from mains power.
- Press and hold the power button for 30 seconds.
- Wait 30 minutes.
- Reconnect the power cable and start the laptop.
- If the laptop still turns off immediately when unplugged, the battery is likely failing or there is a hardware issue between the battery and the laptop. In that case, the practical next step is to have the battery and charging hardware checked by the PC manufacturer or a local technician.
A separate Windows setting can also make charging stop below 100%: Smart charging. When Smart charging is on, the battery may stay below 100% by design to protect battery health. In Windows, this shows a heart on the battery icon and in Settings > System > Power & battery. That behavior does not normally explain a laptop shutting off as soon as it is unplugged, so the shutdown symptom still points more strongly to a battery or hardware fault.
References: