Have you tried using a different charging cable, charging adapter/head, USB port, and/or wall socket? The problem is usually on one of these. But if it's not, I would assume that the problem is either because of a bad battery or damaged USB port.
Let me know if you find the problem. Good luck!