27-year-old Caio César Ignácio Cardoso de Melo provided the Portuguese voiceover for all eight Potter films alongside his main job as a police officer in Rio de Janeiro.
He was killed on Thursday while on duty in Complexo de Alemão - one of Rio’s largest and most policed shanty towns.
His death, which a local news site says was confirmed by military police and by Warner Bros, has struck a chord with Potter fans across the world.
And now Rowling has paid her respects to the father-of-one, saying she is “desperately sad” to hear of his passing.
On Twitter, she wrote: “Desperately sad to hear that Caio César, Brazilian voice of Harry Potter, has died at the age of 27. My thoughts are with his family.”
Her post was retweeted more than 12,000 times in less than 24 hours by supportive fans.
They joined in her tributes, posting their own online.
Nick Ellis wrote: “We are all devastated by the news.”
Another said: “A hero in real life as well... a police officer who died doing his job.”
Kawanna Souza added: “It’s horrible to know that Rio’s violence has finally reached the magic world.”
Charles Emmanuel, the actor who gave voice to Ron Weasley in the Portuguese version of Harry Potter, also shared a touching online post.
His tribute roughly translates to: “Everyone has heard the voice of Caio César at some point.
“I’ve had the opportunity to work with him several times, because we are the same ‘generation’ of voice actors.
“He was a runt, skinny, but but he grew up and went on to become a policeman and turned into a father. He became a man.”
Local police reported that Caio was shot in the neck when officers came under fire during a routine patrol of the sprawling shanty town.
He was taken to hospital and underwent surgery but died from his injuries.
As well as voicing Harry Potter, Caio was the Brazilian voice of Sokka in the animated series Avatar: The Last Airbender, Diego in the Mexican soap opera Rebelde and TK in Digimon.
He had his first dubbing job at just seven-years-old when he took on the voice of the lead role in Disney series Smart Guy.
He is the ninth policeman to be killed in Rio’s slums this year, and around 80 have been shot.