If you have a laptop battery that won’t hold a charge usually it is a good idea to just replace it. But if you want to try a homebrew method to restore it there is some hope.
Put your dead battery in a zip lock back and freeze it for 12 hours. Afterwards, dry it off with a towel and put it in your laptop and charge it fully. Leave your laptop on until it is sufficiently drained and repeat this two more times.
This should help your battery memory so that it will hold a decent charge for awhile.