This happens when you use a faulty cable/charger. Try a Motorola cable and charger if you have. If you do, try a different cable.
I've had this problem several times. Always with a defective/non-Motorola-compliant cable and/or charger.
The Micro USB cable that came with my Powerbank does this and a 5V USB charger that came with a no-name camera. But also a Philips 2.1A USB charger.
So again, try a different, preferably original, charger and/or cable and hopefully you will be fine.
Lost my first ID
Currently XT897/ D6503