Try this:
Plug your phone into the charger and then plug the charger in.
Goto:
Settings
Battery
Look to see if it says Charging on USB or Charging on AC.
If you are plugged into a charger (not a USB port) and it says Charging on USB then try a different USB cord, until it says Charging on AC.
If nothing helps, then change the charger and try it again.
Cords wear out over time, and so do chargers