"We have an adult character in the book who has obsessive compulsive disorder [OCD]," she told ABC News during an interview in Scotland, where she lives. "These are things I know from the inside. ... When I was in my teens, I had issues with OCD."
Rowling said the anxiety disorder manifested itself as "compulsions" -- "checking, double checking, triple checking" things.
The best-selling author said she has written "other things" since the seventh and last of her magic-themed, youthful Harry Potter books was published in 2007, but her non-fantasy novel "The Casual Vacancy" will be the first new book she releases.
"I've written other things during that time, but on and off for five years, that's been my priority," Rowling told ABC News. "I think I've been surprised by the fact that Harry hasn't left me to the degree that I thought he would. And I'm quite glad about that."
"The Casual Vacancy" goes on sale Thursday. It has sold more than 1 million copies in pre-sales in the United Kingdom.