She received the degree of Master of Arts at a special event on Saturday.
"It is a privilege to welcome Malala to Edinburgh and to present her with an honorary degree. Her courage and determination to achieve the basic human right of education is inspiring," said Professor Sir Timothy O'Shea, principal and vice-chancellor of the university.
The degree was presented following Malala's address to the inaugural meeting of the Global Citizenship Commission, chaired by former British Prime Minister Gordon Brown.
Malala survived an assassination attempt by Taliban gunmen in October 2012. She was reunited with two of her Pakistani friends, also injured in the same Taliban shooting that nearly ended her life, at the event.
Kainat Riaz and Shazia Ramzan met the 16-year-old for the first time since the incident in Swat Valley last October.
"After I was shot the terrorists thought that I would not continue the struggle for education, but not only did I not stop my campaign but now Kainat and Shazia are with me and they are also supporting me," Malala said.
"We all know of Malala's incredible courage, strength and determination, and I'm so pleased that she will be reunited with Shazia and Kainat, two young women equally determined that every girl and boy should enjoy the most basic of human rights: a secure, safe place at school," Brown said.
