Ms Yousafzai, who lives in Britain, said she and her new husband, who she identified only as Asser, were married in the city of Birmingham and celebrated at home with their families.
“Today marks a precious day in my life. Asser and I tied the knot to be partners for life,” she said on Twitter.
“We celebrated a small nikkah ceremony at home in Birmingham with our families. Please send us your prayers. We are excited to walk together for the journey ahead."
Thousands of people rushed to congratulate Ms Yousafzai in reply to her Twitter post, including former US president Bill Clinton's daughter Chelsea Clinton, Canadian Prime Minister Justin Trudeau and other officials from across the world.
Ms Yousafzai gave no other information about her husband.
Internet-users identified him as Asser Malik, general manager of the Pakistan Cricket Board’s High Performance Centre, although this has not been confirmed.
According to his LinkedIn page, Mr Malik began work at the Pakistan Cricket Board in 2020. Before that, he had worked with the Pakistan Super League and ran a cricket player management agency.
Mr Malik graduated from Lahore University of Management Sciences in 2012 with a degree in political science and economics. He posted a picture of his wedding on Instagram.
Ms Yousafzai is loved in many parts of the world, especially in western countries, for her courage and her eloquence in promoting the rights of girls and women. In Pakistan, her activism has divided public opinion.
As recently as July this year, Ms Yousafzai told British Vogue magazine she was not sure whether she would ever marry.
“I still don’t understand why people have to get married," she said. "If you want to have a person in your life, why do you have to sign marriage papers, why can’t it just be a partnership?”
The comment drew criticism from many social media users in Pakistan at the time.