Good morning. My name is***** would be happy to help you with this. I'll need to ask a few questions in order to best help you.
First, take a look at the port on the Kindle where you plug in the cable. Does it fit snuggly into the port or does it seem loose? If it seems loose there may be a problem with the charging port.
Secondly, take a look at your charging cable, Does it have any nicks or sharp bends in it? It is quite common for the charging cables to develop a short in them and require replacement. IF you think this is the problem, please let me know the specific model of the Kindle that you have so I can provide links to the cable that you will need.
This problem and many others are often the result of a "glitch" in the software. If this is the case, luckily, it is easily fixed.
Please do the following:
Remove the charger from the Kindle and hold the power button or switch in the OFF position a full 40 seconds. This should reset the Kindle to factory defaults. You will know that it successfully reset to factory defaults, if it reset the Kindle back to the way it was when you took it out of the box. Did it do that? If not, please try it again, being sure to hold the power button for a FULL 40 seconds. If it did require you to set it up again, then the factory reset was successful.
If you do have to reset it to factory defaults, you don't have to be concerned about losing your books. The books that you have purchased from your Kindle will continue to be available at the Amazon website under My CONTENT if you should wish to download them again at some point in the future.
Please give these troubleshooting suggestions a try and let me know the results. Thank you!