The problem may lie with the terminal that connects the battery and the laptop. Here are some troubleshooting steps that may help.
- First, uninstall/reinstall the Battery driver from Device Manager.
- Next to try if to remove the battery and connect just the AC adapter and once the laptop is on put the battery in and see if it will charge or not.
- If all these will not work then the problem could lie inside the laptop where the battery and laptop meets.
- Do contact the manufacturer if it's still under the factory warranty.