Maybe your phone was damaged by water or some other liquid and now it make short contact somewhere or usb connector is shorted when you tried to recharge the phone.The worst option is that something is burned during charging.
Good luck,
Satch
Edit: it is hardware problem so you can't fix it by flashing