Triona Priestley, 15, was sung to over the phone by the star just moments before she died.
Friends of the teenager started a Twitter campaign to get Ed Sheeran to phone Triona and sing Little Bird - one of her favourite songs.
Posting on Facebook, friend Lucy Hanlon revealed: 'It is with great sadness that I have to share with you all today - our beautiful angel was taken from us.
As we all know about the Twitter campaign, Ed's manager Stuart Camp emailed me and today Ed rang Triona and personally sang Little Bird to her as she took her last breaths.'
'Triona left us listening to her idol surrounded by all the people who loved her.'
'Triona left us listening to her idol surrounded by all the people who loved her.'
Ed Sheeran later posted on his Twitter page: 'Rest in peace Triona, so heartbreaking x'
Triona suffered from Cystic Fibrosis which is a progressive illness affecting mainly the lungs. Sufferers experience shortness of breath and difficulty breathing, frequent lung infections and the production of excess mucus.
'Before she even starts her day she had to have medication, use nebulisers, get physic while most children are able to just get up and have their breakfast,' said her mother Bernie.
CF campaigner Orla Tinsley said: 'She was having trouble keeping up in school and hospital was driving her crazy - but she was dealing with it all by writing poetry after her consultant had told her to give it a try.'
'It was gut-wrenching, heart-felt and deeply affecting poetry - wise beyond her years.'