Following his graduation Marei worked at family farm in Al Aziziyah. He joined the Saadist Institutional Party.[5] He was elected as a member of Parliament in 1942 becoming the youngest parliamentarian in the country.[1]
Following the regime change in 1952 Marei was named as the managing director of the Supreme Committee for Agrarian Reform.[5] Therefore, he was in charge of drafting and executing the law on agricultural reforms.[6] He became the chairman of the board of directors of the Agricultural Credit Bank in March 1955.[4] His first ministerial post was the minister of state for agrarian reform to which he was appointed on 1 July 1956 in a cabinet reshuffle.[7] The office was a new addition to the Egyptian cabinet.[7] He was made the minister of agrarian reform in 1957.[1] The ministry was named as the ministry of central agrarian reform in 1958, and Marei continued to head it.[1] He became the minister of agriculture in 1961.[1] He was removed from the post the same year due to the unsuccessful attempts of the ministry to overcome the cotton worm disaster.[5]
Marei served as the vice president of the Parliament in the early 1960s.[3] He was a member of the Arab Socialist Union and became part of its secretariat in November 1964.[8] He was appointed minister of land reclamation in August 1967 succeeding Abdel Mohsen Abu Al Nour in the post.[1] Marei was in office until March 1968, and Mohamed Bakr Ahmed replaced him in the post.[1] However, Marei was reappointed the minister of agriculture in May 1968 when President Gamal Abdel Nasser reshuffled the cabinet.[8]
Marei was appointed deputy prime minister for agriculture and irrigation in November 1970.[4] He was named as the secretary general of the Arab Socialist Union on 16 January 1972 replacing Mohammed Abdul Salem Al Zayyat in the post.[9] With this appointment Marei left his deputy premiership.[9] He became an advisor to the President Anwar Sadat in April 1973.[4]
Marei was elected as the Speaker of the House in 1974, replacing Hafiz Badawy in the post.[3] He also served as the secretary general of the World Food Conference held in Rome, Italy, in November 1974.[10] Marei's term as speaker of the Parliament ended in October 1978, and he was succeeded by Sufi Abu Taleb in the post.[4] Then Marei was again named as the advisor to the President Anwar Sadat.[4] He was one of the political figures of the Sadat era who developed economic policy of the country.[6] He adopted a politically liberal and socially conservative leaning during this period.[11]
Marei resigned from his post of the presidential advisor in 1981 shortly after the assassination of Anwar Sadat and the election of Hosni Mobarak as president.[6]