It will take place next month.
Proceeds from the performance will go to the Malala Fund, which aims to support the education of girls around the world.
The performance will take place against “the backdrop of a worsening global refugee crisis, which has interrupted the education of millions of young women”, a statement from Lord Lloyd-Webber’s theatre company said.
The performance will take place next month with “every penny raised” being donated to the Malala Fund, it added.
Ms Yousafzai said: “Since age 10, I’ve been fighting for a world where every girl can learn and lead.
“But in the past two years, girls in many countries have faced enormous setbacks to their education, from Covid to economic pressures to conflict and displacement.
“I am grateful to my friend Andrew for all his support, and I want to thank the cast and crew of Cinderella for arranging this special performance to support Malala Fund.”
Ms Yousafzai was shot in the head by a Taliban gunman at the age of 15 after campaigning for girls to be educated in her native Pakistan.
Since recovering from her injuries the Nobel Prize laureate has continued to be a prominent campaigner for the rights of women and girls.
Lord Lloyd-Webber said: “I am an enormous admirer of Malala.
“She is an extraordinary person and you can imagine my delight when I discovered that she loved musical theatre.
“Malala and her fund work to empower women and girls to be the best version of themselves and the people they truly want to be.
“Recent events in Afghanistan, and the worsening of the global refugee crisis, which will be inevitably exacerbated by climate change in the years to come, have brought into sharp focus the importance of Malala’s work.
“We wanted to do this gala performance of Cinderella because our heroine is a strong-willed and mischievous young woman whose lesson is: don’t change to please others.
“I want to thank everyone who supports this gala and enables us to do more to help women and girls to achieve their dreams.”
Cinderella writer Emerald Fennell added: “Malala Yousafzai is a true hero and a beacon of light to so many of us.
“It is an honour to be able to support her work in any small way, especially at such an urgent and terrible time for the women and girls around the world.”
The performance of Cinderella, which premiered earlier this year, will take place on November 22.