There are several possibilities to solving this issue. (1) Bad cable connection: There might be dirt or dust in USB cable. Also, try plugging in the charger into the wall outlet. (2) Broken charger or USB cord: Try using a different charger/cord to see if there's an issue with the current charger/cord (3) Dead battery: Try using the charger for another device. If the charger charges the other device but not yours, your battery may be dead and will need to be replaced. (4) Broken charging chip: If none of the previous suggestions are the cause, it is probably your charging port and you will need to replace the chip it is connected to. HTC One M9 Troubleshooting