By any measure in publishing, cartoonist Dav Pilkey is a rock star.

The children’s author created his characters Captain Underpants (a superhero for grade-schoolers) and Dog Man (a hound-supercop) while an Ohio second-grader, sitting alone in the hall during class as a result of his ADHD.

Now Pilkey is 53, and “Dog Man” — a franchise that has sold millions — is perched atop the New York Times bestsellers list for children’s series, while “Captain Underpants” is at No. 8 (both books have sat on the list for years).

The Seattle-area-based cartoonist has also kicked off a “Do Good” book tour to promote his latest Dog Man bestseller, “For Whom the Ball Rolls,” The tour has brought him to Washington, D.C., including for a Library of Congress special performance from “Dog Man: The Musical” on Friday evening.

Pilkey chatted with Book World en route to Washington to discuss how dyslexia motivated him, why his books get banned and how his comics reach young readers. This interview has been edited for length and clarity.

Q: You have used puns like “The Hallo-weiner” in your books. What’s your most shameless pun?

A: It might be “Hally Tosis.” And I can’t take credit for that — that’s my dad’s joke. We had a dog when I was a kid and her name was Halle, and she did have a horrible breath. My dad used to call her “Halle Tosis.” And I just thought that was a funny, cutesy little name until I was a little bit older and I realized what it was.

Q: At what age were you diagnosed with attention deficit and dyslexia?

A: I was probably about 8. They didn’t have the term ADHD. They called it extreme hyperactivity disorder. Back in those days, the specialists prescribed caffeine for me, so I was drinking coffee for breakfast.

Q: How did that work out?

A: The only way I could get it down was, my mom would put in chocolate syrup with cream. I think I was so buzzed off the sugar that it didn’t quite work out.

Q: And you had to sit in the hall in elementary school?

A: So little was known about those conditions back in those days, and I think it was just seen as I was distracting everyone in the class with my silliness. I couldn’t stay in my chair and keep my mouth shut. So the teachers from second to fifth grade just put me in the hall. It ended up being kind of a blessing for me, too, because it gave me time to draw and to create stories and comics. I guess I made lemonade out of it.

Q: So you created Captain Underpants while in school?

A: I did. And Dog Man, as well. They were the first comics that I remember creating. In fact, my second-grade teacher gave me the idea for Captain Underpants. She mentioned underwear in class and everyone laughed and I was like: “Oh, that’s a good subject. I’ll do something with that.” And so that was that.

Q: So while you were sitting in the hall, you were also sitting on a future publishing empire?

A: Making comics was a way for me to stay connected to my classmates. I wasn’t just a kid in the hallway. I guess in a way I’m still trying to connect with my readers.

Q: You must hear from young readers who tell you about their own difficulties and why your books help them.

A: I do. That’s actually one of the reasons I love to go out on the road and tour so much. Sometimes they’re proud in a way. There will be kids who will have posters they hold up that say that they’ve “got dyslexia like Dav,” or they’ll tell me proudly that they have ADHD. I don’t call it Attention Deficit Hyperactivity Disorder. I call it Attention Deficit Hyperactivity Delightfulness. I want kids to know that there’s nothing wrong with you. You just think differently, and that’s a good thing. It’s good to think differently. This world needs people who think differently; it’s your superpower.

Q: Why do you think Captain Underpants gets challenged so much and ends up on Banned Books lists?

A: I can only talk about what they say — that it encourages children to misbehave or question authority. I don’t know that questioning authority is a bad thing. I think that’s actually a good thing, and I don’t think it encourages kids to misbehave — they’re going to misbehave anyway. I hope it encourages kids to think for themselves and to use their imagination. I don’t see a problem with that. That banning, I don’t really understand it, but not everybody likes the same thing. I get that.

Q: What is the focus of your current “Do Good” tour?

A: The theme is something that came from the books. There’s a character named Petey, and then this little kitten comes along, and slowly the bad guy is starting to change. It might sound corny, but the power of love is transforming him. I was really surprised that the kids are responding to that. This was kind of my story, as well, trying to be a better person now. The newest book explores the idea of doing good. I’m turning that into a verb and an action word: If you see a kid eating lunch by himself at school, invite him over. That’s how we can all do good. We formed a tour around that whole idea, and we have this wall where kids can write how they’re going to do good. Some of the things that the kids come up with are funny, and some of them are just sweet. Some of them bring tears to your eyes.

Q: And now, as you bring the tour to D.C., you’ll get to see numbers from your musical performed in a Library of Congress setting.

A: I can’t believe it’s all happening together. We’re just so excited to have everybody [from the cast] in Washington, D.C., because I am such a huge fan of [Librarian of Congress] Carla Hayden and all the work that she does. She’s out there doing good.

As part of the year-long National Book Festival Presents series, Pilkey is appearing at the Library of Congress on Friday at 7 p.m.