"Not doing nothing", is not, as some have asserted, grammatically incorrect. It is just pretty likely that the speaker means something different than the strictest interpretation of the phrase would mean.
For example, if I am talking to my kid:
Me: "Kid, it is a beautiful sunny day, how come you are sitting here doing nothing?"
Kid: "I'm not doing nothing; I am imagining what it would be like to travel to Jupiter."
Here, the kid is using the phrase correctly. However, most likely Peeves does not have that intent at all, he really means "I am doing nothing." It additionally has a color of sulky and sophomoric. It is one of those phrases that people frequently misuse, and most likely Ms. Rowling is trying to convey a particular flavor of the pesky poltergeist's personality.
It is fair to ask if it is actually incorrect. If many, many people use a particular phrase, and its meaning is well understood, then, the goosebumps of strict grammarians notwithstanding, it might be argued that it is at least colloquially correct. Frankly, I could care less, or I couldn't care less, or something like that :-)