Sounds like a failed battery. This could be an expensive fix, as most tablets aren't really designed to be opened up to repair. I'd call the manufacturer and see if it's under warranty, and/or get the address of an authorized and certified repair center.
Since it still works while on wall power, take the time to back up your data now, just in case.