If you notice your iPhone won’t charge, keep it plugged in and press the Home and Power button down at the same time until the Apple logo appears, that can take up to twenty to thirty seconds if your iPhone battery is low. Once the iPhone reboots, then it should start to charge properly again, but if it doesn’t there are a few more things you can try to get it working properly again.

It is possible that lint or other small debris has collected in the iPhone dock connector or the USB cable. This would cause the iPhone to stop charging. Usually using compressed air to clean all the connector pieces will fix this problem. If you don’t have any canned air, then a small, soft brush will oftentimes do the same thing.

Make sure you are charging your iPhone through a wall outlet instead of your keyboard. This will help you make sure your iPhone is getting the highest amount of power. Sometimes a keyboard won’t charge your iPhone because it doesn’t have enough power to do so. Make sure to check whichever cable you are using to make sure that is not the problem. New cables are inexpensive and can be picked up just about anywhere if you need a new one.

If your iPhone won’t charge after you have tried to reboot it, plug it into a wall outlet, check the dock connector and cable, then chances are you will need to replace the battery. If you have AppleCare for your iPhone or it is less than a year old, then you should be able to get a free replacement. If you need to buy a new one it will cost around $79 plus shipping.

Source Apple Store