Rowling has lent her voice to the animated comedy show for an episode set for broadcast next season, the Fox network said Wednesday.
Another guest in the episode will be Ian McKellen ("The Lord of the Rings" films), who also plays himself, publicist Antonia Coffman said.
The Simpson family crosses paths with Rowling and McKellen when they travel to London.
Rowling fumes sarcastically when young Lisa Simpson pesters her for details about how the "Harry Potter" series will end. McKellen is besieged by falling anvils and other disasters when Homer Simpson repeatedly says the name of Shakespeare's "Macbeth" aloud at the theater, which performers regard as bad luck.
Coffman said the episode is likely to air in November or December.
Worldwide sales of Rowling's first four "Harry Potter" books top 190 million copies, and the upcoming fifth installment, "Harry Potter and the Order of the Phoenix," is set to hit bookstores June 21.
The third installment in the film series, "Harry Potter and the Prisoner of Azkaban," is scheduled for release next year.
LOS ANGELES -- Count on more cloak-and-dagger drama next TV season.
Fox has renewed the real-time cliffhanger thriller "24" for a third season, and ABC has ordered another run of the female spy adventure "Alias," which also will be in its third year.
"24" stars Kiefer Sutherland as a counterterrorism expert trying to face down shadowy threats over the course of one day, with each hour of the show representing one hour of his pursuit.
"Alias" stars Jennifer Garner as an international secret agent working alongside her father (Victor Garber) in a web of double-dealings among the CIA and assorted villains.
Despite critical praise, both shows have remained only modest hits -- although both saw a rise in viewership this year among the advertiser-favored audience between ages 18 and 49.
ABC also announced plans Wednesday to renew its sitcoms "8 Simple Rules for Dating My Teenage Daughter," "According to Jim," "George Lopez," "Less Than Perfect," "Life With Bonnie" and "My Wife and Kids."
DALLAS -- When the second season of Anna Nicole Smith's reality show debuts Sunday on E! Entertainment Television, her stepson won't be watching.
"Despite our differences, we wish Anna the best in her program's second season," the family of E. Pierce Marshall said Thursday, adding, "No. The Marshall family doesn't watch the show."
"The Anna Nicole Show" follows Smith's daily misadventures. The reality series debuted in August with the highest ratings ever for an E! program, but its numbers slipped in following weeks.
Cameras follow Smith as she spars with her lawyer, pals around with her personal assistant and coos at her poodle.
Smith spent seven years in a battle over the estate of her late oil tycoon husband, J. Howard Marshall, who died in 1995 at 90. Last year, she won an $88 million judgment, which E. Pierce Marshall is appealing.
The 35-year-old former Playmate and Guess? jeans model lives in Los Angeles.
Smith, whose real name is Vickie Lynn Marshall, met her husband in 1991 when she was working as a stripper. The couple married three years later, when she was 26 and he was 89.