Tried to factory reset it, nothings change. Also when I plug the charger it works perfectly fine but when I removed it, 10 secs later it will shut down. Hope you can help me.
Welcome to Android Central! I agree with belodion -- the battery has probably failed. It's a 5 year old phone, so this is not surprising. You'd have to bring it to a repair shop to get the battery replaced, but this may be a good time to upgrade to a more modern phone.