Try someone else battery? or charge it on someone else phone. I suspecting your battery having problem. if you can charge it when N900 off then then the problem is OS or something unstable with the OS. But since it a second hand it might be somewhat suspecious. Take it to your nearest Nokia store and let them fix it.