Your battery needs 'some' charge in it before it gets detected and used by your laptop.
Remove the battery, press and hold the power button for 20 seconds to remove and static energy and then connect the adapter and power on your laptop without the battery. Now when the laptop is running, insert the battery (don't worry, it's not dangerous). Now your battery will get detected and start charging.
Reason for this happening:
Your laptop adapter powers your laptop+charges a low power battery. Unless it detects the battery (which it doesn't when it's at 0%) it doesn't charge it.
I had a few people telling me that this solution didn't work for them and asking what else would be possible. I'd like to let you know that an old laptop battery of mine was having a similar problem for its 2nd replacement of a third-party battery (the original batteries are no longer in the market).
This solution did not seem to work for me as even after doing the above trick, it would "seem" to be charging but actually wouldn't.
Today, I took a different approach and kept using my laptop with a Linux OS (Kali Linux if anybody would like to know) The OS kept trying to estimate how much battery power was left and how long it would take to full charge. It couldn't detect as usual. After about an hour of usage, it could tell me that there was 1% of charge in the battery. This has not happened before and I decided to switch off the laptop and kept it plugged in to the power socket.
2 and a half hours later, it's at 85% now! I've never had the patience to try this solution as I never thought it would work. I'm using the laptop now to type out this answer without any power adapter plugged in and it's going smooth till now. It's now at 79%.
I'll continue to drain the battery till say 10% and charge it up to 100% for the next few days and hopefully, things should go back to normal :)
Please try this solution out when time permits. I nearly bought a 3rd battery again.