The 19-year-old, who is doing her A-levels and has an offer from a top UK university, will take the role with a special focus on girls’ education.
In 2012 Ms Yousafzai was nearly killed by the Taliban for campaigning for girls’ rights to education. She had narrowly escaped death after being attacked on her way home from school in Pakistan.
“(Bringing change) starts with us and it should start now.”
“If you want to see your future bright, you have to start working now (and) not wait for anyone else,” he said.
United Nations secretary-general Antonio Guterres described her as a “symbol of perhaps the most important thing in the world – education for all”.
UN Messengers of Peace are selected from the fields of art, literature, science, entertainment, sports or other fields of public life.
Other messengers have included Muhammad Ali, George Clooney, Michael Douglas, Leonardo DiCaprio, Stevie Wonder and Charlize Theron, BBC reports.