Sounds like an issue with the dock connector or battery on your ipod. Only thing to do would be to see if Apple could do anything. Usually they offer you a refurb one at a discount or 10% off a new ipod.
I had an issue with my nano and that's what they offered me over the weekend when it couldn't be fixed.
EDIT: i just realized you said it charges when plugged into the Mac also, there is most likely something wrong with the dock connector on the ipod. I would check the pins on the ipod like Ravindra Mohabeer mentioned below.
Last edited by jhuynh; Oct 17th, 2012 at 09:41 AM.