Hayek wrote in the photo caption: "My daughter Valentina is growing her beautiful mane so she can cut it and donate it to make a wig for children with cancer."
It wasn't long before fans began commenting on the photo congratulating Valentina for her heartwarming gesture.
"Bravo Valentina, this is such a wonderful thing do to," one person wrote.
"What a big heart she has, how beautiful," commented another.
Hayek has previously spoken out about how Valentina loves doing her mum's makeup
Other fans offered advice on where Hayek should donate the hair, arguing some organisations "sell" these wigs.
"Just be careful because some foundations will sell wigs to little girls in need," wrote one person.
"Do the research. I know because my little boy had cancer and I donated my hair too, but I made certain they would give the wig to the needy, not sell it."
"These two donate and don't charge the recipient. Pantene is a minimum of eight inches. Wigs for kids is 10 inches. Good luck!"
A similar charity in the UK is the Little Princess Trust.
Previously speaking about her relationship with her daughter, Hayek said the eight-year-old often does her makeup.
"She is so good with makeup," the mum said according to MailOnline.
"She's done my makeup and she's really, really good. I have the opportunity to work with great makeup artists and she's watching them like a hawk."