Yeah, looks like it's the battery. Is it under warranty? If it is, get a new one.
When you are using power directly from the mains you shouldn't be using your battery. This makes it last less long of a period of time.
When not in use, e.g in the holder when in the mains, take it out and keep it in a cool place (even the fridge). This will make it last much longer and less chance of malfunction like this
If they don't replace it, burn it and say it did it while you were on your laptop and threaten to sue
(Joke)