Hi,
Does the issue only occur when charging the iPhone with the USB Power Adapter that came with it?
Make sure the USB Power Adapter is plugged directly into the wall.
Also, try testing the USB adapter in another outlet.
If you have another Dock Connector to USB Cable or USB Power Adapter, you could try testing with one of those to find out if there is a hardware issue.
If you believe there is a hardware issue with the USB Power Adapter, request repair online here:
https://selfsolve.apple.com/GetWarranty.do
You can also make a reservation with a Genius online here:
http://www.apple.com/retail/geniusbar/ or call AppleCare U.S. iPhone technical support at: 1-800-MY-IPHONE (1-800-694-7466).
-Jason