Chrissy Hart's daughter was being treated for cancer and throughout her time in hospital would turn to the Harry Potter series as an escape.
The emotional letter, which was sent to Edinburgh-based author JK Rowling (real name Joanne Rowling) was read out at a live performance in London called Letters Live.
Letters Live is described by the organisers as a 'celebration of the enduring power of literary correspondence' and an opportunity to make public the remarkable letters written by those in the literary world.
The event has seen many actors and celebrities, including Jude Law and Benedict Cumberbatch, read out letters.
Ellie Bamber, known for her role in Price and Prejudice Zombies, was fortunate enough to be given the opportunity to read Chrissy's letter.
The heartbreaking letter began; 'I write to you as a mother, a Mummy, of a beautiful little girl.
'I'm sure you hear people tell you all the time that your words, your imagination helped them, or their children, in some way. Maybe they were helped out of depression by your works, maybe they drew strength from the knowledge that Neville grew up to be a hero against all odds, maybe you taught a bookish boy that there are friends to be found between the pages of a novel.'
Organisers of the Letters Live event confirmed that Chrissy's daughter tragically passed away this week, although the letter was written last month.
'I want to share with you what you taught my daughter, who was recently diagnosed with cancer. When I read her your stories, she didn't take to the clear distinction between good and evil, but instead loved the grey characters.
'You taught her that for every chemo she has to go through, there will be the opportunity to fly across a lake on a hippogriff. For every time her heart seizes with fear of pain, there will be me chasing it away with a patronus charm.'
The mother explained how JK Rowling's words 'built a castle' for her daughter to retreat to when the prognosis was getting worse.
Addressing the author directly, Chrissy said; 'Mrs Rowling, cancer threatened to take everything from my daughter, and your books turned out to be the fortress we so desperately needed to hide in.'
Not only were the books able to help her daughter in her time of need, but they taught Chrissy things too; 'You made me realise that a mother's courage might come in the form of her tears. I might not have the physical ability to block her from what will take her away from me, but I can be loving and gentle like Molly, stoic in my affection like Minerva, protective and loyal like Hermione, and waiting to welcome her home like Lily.'
Ending the emotional note, the grieving mother added; 'But the most important lesson you have taught us both: cancer may take her away from me in just a few short weeks. I might not be able to spare her the pain. But for every child that is taken too early, people will come together, huddling close in a big group, wands held high to light the dark sky with the love they felt.
'You built Hogwarts as a home for her to return to. And for me. For that I shall remain forever gratefully yours.'
Actress Daisy Ridley took to her Instagram page to share the letter and added a caption; 'One of the most beautiful letters I've ever read. The power of words is undeniable. It may make you cry. Just gorgeous.'