The Harry Potter writer got to know Mr Rickman, 69, when he took on the role of Professor Snape in the film adaptations of her book series.
Reacting to the news of his death, she tweeted: "There are no words to express how shocked and devastated I am to hear of Alan Rickman's death. He was a magnificent actor & a wonderful man."
The author sent her condolences to Mr Rickman's widow Rima, whom he met when he was just 19 years old.
"My thoughts are with Rima and the rest of Alan's family," she said. "We have all lost a great talent. They have lost part of their hearts."
Mr Rickman's family confirmed today that the beloved and respected actor of stage and screen had passed away in London, surrounded by his loved ones, following a battle with cancer.
Many other celebrities and co-stars also took to Twitter to share their grief at today's sad news.
Alan Rickman. Incredible actor and director. Above all, the most generous, funny, loving friend to us. @Deborra_lee and I will miss you so .— Hugh Jackman (@RealHughJackman) January 14, 2016
Oscar noms out. Couldn't care as Alan Rickman is gone & could have done every job on those movies as well, women included. Stunning talent.— Jamie Lee Curtis (@jamieleecurtis) January 14, 2016
Such sad news about Alan Rickman. What very strange week— Leigh Francis (@LeighFrancis) January 14, 2016
RIP Alan Rickman. You were the voice, the stage, the film, the actor, and you will be missed truly, madly , deeply. pic.twitter.com/4ZLx7JgX2V— Selma Blair (@SelmaBlair) January 14, 2016
The spectacular Alan Rickman passed away... One of my favourite actors of all time. Thank you for your gifts. RIP— Debra Messing (@DebraMessing) January 14, 2016
Devastated to hear of Alan Rickman's passing. This week Britain has lost two of it's greats, far too young. pic.twitter.com/C7CrtR0Ryx— Douglas Booth (@DouglasBooth) January 14, 2016
What desperately sad news about Alan Rickman. A man of such talent, wicked charm & stunning screen & stage presence. He'll be sorely missed— Stephen Fry (@stephenfry) January 14, 2016
I do not want my heroes to die!— Eddie Izzard (@eddieizzard) January 14, 2016
Alan Rickman is dead & he was another hero. Alan - thank you for being with us. We are sorry you had to go
Harry Potter fans will miss Alan Rickman very much. He was a wonderful actor and a very dear friend. (2/2)— Harry Potter Film (@HarryPotterFilm) January 14, 2016
Some actors you work with you will never forget. RIP The wonderful Alan Rickman xo pic.twitter.com/kIAVjA6HBY— Kim Cattrall (@KimCattrall) January 14, 2016
Such a lovely, kind, generous, funny and brilliant man. Thank you Alan Rickman for that and for so many flawless performances— mia farrow (@MiaFarrow) January 14, 2016
Goodbye Alan Rickman. You were genius in Harry Potter.— Boy George (@BoyGeorge) January 14, 2016
Alan Rickman. Incredibly kind. Beyond talented. Devastatingly funny. Damn.— Colin Hanks (@ColinHanks) January 14, 2016