After completing his military service, he began his academic studies at the Hebrew University's law school for a bachelor of law degree. In 1973 he was first elected as a Member of the Knesset, at age 28, to the Eighth Knesset. In the years 1979-1982 he took up volunteer service in the IDF and underwent officers' training concurrently with serving as a Member of the Knesset.
He volunteered for reserve duty in Lebanon. In the years 1981-1988 he served as a member of the following committees at the Knesset: foreign affairs and defense, finance, education, and defense budget. In the years 1988-1990 he was a Minister of Minority Affairs. In the years 1990-1992 he was Minister of Health and initiated the reform which lay the foundations for the National Health Insurance Law and the corporatization of governmental hospitals. In the years 1993-2003 he was Mayor of Jerusalem. Following Shamir's defeat in the elections for the Thirteenth Knesset, Olmert decided to run for the office of Mayor of Jerusalem against veteran mayor Teddy Kollek. With the support of the Ultra-Orthodox, Olmert won the elections. The alliance with the Ultra-Orthodox made Olmert appear as their lackey. On his part, he claimed that during his time in office, Jerusalem's businesses had remained open on the Sabbaths.
As mayor, he acted to increase Israeli control of East Jerusalem, urged the founding of the Har Homa neighborhood, the opening of the Western Wall Tunnel and arterial road system, and the paving of the light rail. In 1998, following the elections for a second term of office as Mayor of Jerusalem, Olmert resigned from the Knesset after 25 years of tenure, this being pursuant to a law he had enacted, which states that a Member of the Knesset may not serve in an additional public position. In 2003 – in the elections for the Sixteenth Knesset, he served as head of the elections headquarters on behalf of the Likkud Party. He was elected to serve as Acting Prime Minister and as Minister of Industry, Commerce and Employment, and later as Minister of Communications. In 2005 Olmert was appointed as Acting Minister of Finance.
In 2006, when Prime Minister Ariel Sharon announced the founding of the Kadima Party, Ehud Olmert left the Likkud Party and took his place at Ariel Sharon's side in preparation for the elections. On Wednesday, January 4th, 2006, following Prime Minister Ariel Sharon's hospitalization, Olmert took up the powers of the Prime Minister. According to law, one hundred days after having assumed the position of Acting Prime Minister, Olmert was appointed as de facto Prime Minister on April 11th, 2006. On May 4th, 2006 he was sworn in at the Knesset as Prime Minister of Israel.