I had this problem with my iPhone 5s. I placed the phone in recovery mode by syncing it to a computer through a USB cable while holding down the home button. That broke the vicious cycle. (I did not let the recovery process continue because I didn't let iTunes open). I let it charge for a bit, and the next time I plugged it into the charger, it was able to charge normally. I did not need to recover my phone.