Please do try these troubleshooting steps that may help. -
Do a hard reboot, remove the battery and unplug the AC adapter then press and hold the power button for 20 seconds then try charging it again. -
If it will still not work, uninstall/reinstall the battery driver from Device Manager. -
Next to try if it will still not work is to test the AC adapter. - Remove the battery off the laptop then connect just the AC adapter and see if it will stay on. - While the laptop is on put the battery back in and see if it will charge normally. -
Do also try doing a battery calibration that may also help. - \
Also try a different AC adapter that has the same voltage and see if that will work or not. - If all these will not work replacing the battery would be the last option.
viatomsguide