When a laptop turns off immediately after unplugging it from the power source, it usually indicates a more serious problem beyond just a low battery. This often suggests an issue with the battery ...
Turn off your laptop and disconnect the adapter from the power outlet. Now take a lint-free cloth and gently clean the connectors. Once your connectors are clean, the charging issue should be resolved ...