In a statement on her personal website, Rowling said film-makers had considered recasting the role of villain Gellert Grindelwald for Fantastic Beasts: The Crimes of Grindelwald, the sequel to last year's Fantastic Beasts and Where to Find Them.
But she said the circumstances of Depp’s divorce from actress Amber Heard were private and should be respected.
The Warner Bros movie, due to be released in November next year, is the second of a planned five movie spin-off franchise from the blockbuster Harry Potter films.
“Harry Potter fans had legitimate questions and concerns about our choice to continue with Johnny Depp in the role,” Rowling wrote.
“The agreements that have been put in place to protect the privacy of two people, both of whom have expressed a desire to get on with their lives, must be respected.
“The film-makers and I are not only comfortable sticking with our original casting, but genuinely happy to have Johnny playing a major character in the movies,” Rowling said.
Depp’s marriage to Heard ended in divorce amid bitter allegations of domestic abuse and blackmail.
After reaching a private settlement in August last year, the couple issued a joint statement saying their relationship was “intensely passionate and at times volatile, but always bound by love,” and that there was “never any intent of physical or emotional harm.”
Warner Bros said in a statement on Thursday that it supported the decision to keep Depp. Director David Yates and producer David Heyman also said in a joint statement that, while recognising “the magnitude of the issues raised”, they stood by the decision to cast Depp.
Depp’s representatives did not immediately respond to a request for comment.