The generous six-year-old, from Dalkeith, was spurred into action after watching a moving piece on favourite TV show Operation Ouch!
So moved was Lilly by the plight of children losing their hair while undergoing chemotherapy, she also raised hundreds of pounds for charity.
Woodburn Primary pupil Lilly said: “It would be horrible to have cancer and really sad for those girls to have their hair fall out too, I don’t want them to be sad so they can use mine.”
Proud mum Laura, 32, said: “After having a chat and answering some of her questions we got onto the subject of children’s hair falling out during cancer treatment.
“Lilly was upset to think that a girl could lose all her beautiful hair but was pleased to hear they could wear wigs.
“I told her about real wigs and that people donate their hair – and from there her mind was made up that she wanted to do hair donation.”
So Lilly began growing her hair at the beginning of last year ready to be cut nearly 12 months later.
“She had four ponytails of 11.5 inches chopped off and she loves her new hairstyle!” said Laura, a childminder.
Lilly’s locks are now on their way to the Hereford-based Little Princess Trust which makes wigs out of real hair for young cancer patients.
Monica Glass, of Little Princess Trust, said: “We are delighted to hear that Lilly has decided to cut her hair and donate it to the Little Princess Trust.
“It’s such a brave decision to cut off 11.5 inches but we are hugely grateful as we can use Lilly’s donated locks to make real hair wigs for children who have lost their own hair.
“Receiving a wig has a profoundly positive effect on those we assist. Thank you Lilly and thank you to all of your supporters!”
Lilly was also sponsored to take part in charity CLIC Sargent’s Big Buzz challenge in which fundraisers shave or cut their hair in support of children and young people with cancer.
“Her family and friends have helped her raise £500 for CLIC Sargent so that she can help other children with cancer too,” said Laura.
The stunt is seen as a powerful way to show support for young cancer patients who may lose their hair while undergoing treatment.
Hundreds of “life shavers” have taken part across the UK since 2010 – raising £400,000.
And Lilly is not finished there, recruiting younger brother Harris to take part in the kids race at the Edinburgh Marathon in May. “I’m a very proud mum!” beamed Laura.