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.
Accepting the accolade in New York, she said: "(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".
Last month, Ms Yousafzai said she had received an offer to study politics, philosophy and economics at a UK university, on condition of achieving three As in her A-levels.
Ms Yousafzai, who narrowly escaped death after being attacked on her way home from school in Pakistan, did not confirm which university had made the offer.
But previously she revealed she had interviewed for a degree place at an Oxford college.
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.