1. Check your charger cable for any crack also if you're using a multiplug connected to a wall power socket try changing it.
2. Try another power adapter making sure its properly rated for the power required for your laptop.
3. If you feel there is no issues with dust, cable etc. Remove battery and disconnect the power adapter and now press and hold power button for 30 seconds to reset bios. Then reattach battery and adapter and test.
4. If no luck it could be battery issue requiring replacement or charging port on laptop is faulty.