The honourary doctorate was conferred by Rector Academic Abel Maharramdov in an impressive ceremony held here.
Speaking on the occasion, the Prime Minister thanked the Baku University administration for honouring him with the doctorate.
He said the bonds between Pakistan and Azerbaijan were based upon historical, cultural and social affinities and the ways of life the people of both countries shared.
Their fate was shaped through their common goals and objectives, he added.
Prime Minister Sharif said that progress and prosperity could be achieved through peace.
Earlier, Prime Minister was given briefing about the role and function of the university. Students clad in Pakistan national dress also presented national anthem.