Hasanov has been member of various parliaments for 23 straight years: in 1977–1995 as deputy of Supreme Soviet of Azerbaijan; in 1979–1984 as deputy of Supreme Soviet of the Soviet Union; in 1995–2000 as member of National Assembly of Azerbaijan (Milli Majlis). He was also a member of International Relations Committee of Milli Majlis and member of the committee writing the new Azerbaijani Constitution. From 2004 until 2010, Hasanov served as Ambassador Extraordinary and Plenipotentiary of Republic of Azerbaijan to Hungary. On 30 March 2010, he was appointed the Ambassador of Azerbaijan to Poland. On 8 January 2021, Hasanov was dismissed as the Ambassador of Azerbaijan to Poland, Nargiz Gurbanova was appointed a new ambassador by a presidential decree.