Try charging it with the laptop turned off. Not sleep or hibernate but off. If it will charge while it is turned off, but not when turned on, then you need to look into replacing the charger. That is a sign of it going bad.
If, however, it won't charge even when it is turned off, then I would look at replacing the battery.