It's a hardware issue upto me. Some laptop batteries get really hot while charging, and if the laptop is running and under load they will get even hotter. To prevent the sensitive Lithium-Ion cells from catching fire, there is a thermal sensor inside which suspends charging if the cells exceed a certain threshold (i believe it's 50C). Shut down the laptop and you'll find that the battery will charge.
Also, when you use the laptop on AC power and don't need to leave right away with it, take out the battery. This will more than double its service life. Batteries wear out very quickly if kept fully charged all the time.