Hello and welcome to justanswer, my name is ***** ***** i will be assisting you today,
I'm sorry about the issue, it seems to be a battery issue it may need a replacement. but we can try some troubleshooting before that :
1. Backup all your important data and Try a reset. Press and hold the power button and the home button together until you see an apple logo.
2. If that does not resolve the issue, reset all settings. Go to settings > general > reset > reset all settings. This will remove only the settings and no content will be deleted.
3. Restore the iphone. Open itunes in the computer and connect the iphone. Your iphone name would be listed in itunes. click on the iphone name and you will find the restore button. After the restore, you will have two options - restore from backup and set up as new.
Try the restore from backup (this will bring back all the contents). If that does not work, restore it again, and this time set it up as new (unfortunately, this will wipe everything off the iphone). But you can get all your purchases back as they are all safe in itunes and icloud.
If none of the above works, sorry to say, your battery needs a replacement. You can either take it into any apple store nearby or call apple care to set up the repair/replacement. : http://support.apple.com/kb/HE57
Hope this helps. Let me know if you need further assistance
If you have a moment please rate my answer by clicking on one of the stars, positive rating are appreciated. Note : Only rate of you are 100% satisfied, please do not rate an answer as poor or bad service if you are not satisified.