It seems like the battery of your laptop is already faulty but here are some other troubleshooting steps that may help.
- First is to do a hard reboot, remove the battery and unplug the AC adapter then press and hold the power button for 20 seconds then try if it will charge or not.
- If it will still not work, remove the battery again plug in the AC adapter and boot it up.
- While the laptop is on with just the AC adapter put the battery back in and see if it will charger or not.
- Next to try is to uninstall/reinstall the battery driver from Device Manager.
- If all these will not work I would suggest replacing the battery itself.
It is most likely a problem with your battery, either it is not connecting properly or the battery itself is dead. Generally lithium ion batteries (most likely the type in your laptop) last for roughly 20,000 charge cycles before losing a considerable amount of their capacity. Depending on how often you use your laptop, the life span of the battery could range from 1-5 years.
If you end up replacing your battery, try not to keep it charging constantly. It is always good to let lithium ion batteries discharge at least half way once every so often, sometimes this can improve their lifespan.
I would also recommend the course of action that Laptop_Nerd has suggested as well. Only buy a new battery if you are sure that it is dead.
From your description it sounds like there is nothing wrong with the laptop itself (except the battery), so if you don't need to take it on the go, you could just use it while plugged in. Doing this will not harm it, the only thing it could potentially harm is the battery but that seems to be dead so it is no problem!