The singer responded to a social media appeal on behalf of Sophie Birtles, who has the rare genetic disorder Juvenile Sandhoff Disease.
Referencing one of her best-known hits, American pop star Perry said: "Sophie, I heard your story and wanted to say you are a firework and I do love you."
Thousands of people have shared #youreafireworksophie on social media.
In her personal message, Perry said: "Everybody loves you and we're all thinking about you all over the world right now."
Sophie's father Andrew said she loved the message and thanked everybody who helped to make it happen.
Sophie is currently being cared for at Rebecca House Children's Hospice in the Isle of Man.
Katy Perry has fulfilled the dying wish of a 13-year-old girl from the Isle of Man by sending her a video message.