Incumbent Jettou was a former businessman with no political affiliation and democracy activists had called for his replacement to be chosen from among the parties which emerged with the most seats in the election.
The king said he had chosen El Fassi after taking into account the vote results.
He called El Fassi "a man of state with great experience, who has always shown a sincere political commitment and a great sense of responsibility in the different positions and missions he has carried out."
Mohammed said the new government must work for democratisation and development.
El Fassi's party played a central role in the fight for independence from France and has a conservative, nationalist agenda that includes staunch support for Morocco's presence in the disputed territory of Western Sahara.
The new government will have to tackle both widespread poverty and a rise in politically motivated violence.
Seven bombers blew themselves up in the economic capital Casablanca in March and April, killing themselves and a police officer, while al-Qaeda's North African wing has threatened more attacks across the region.
Several parties besides Istiqlal could win ministerial posts in the new government, including the Islamist Justice and Development party which came second in the polls which were marked by a low turnout.
El Fassi said the king had asked him to consult with political parties to come up with a cabinet.
He said: "His majesty gave me advice and guidance, which I will respect down to the letter, so that Morocco has a government that lives up to its challenges, and so the kingdom can address questions, notably on social policy."
He said he would begin the consultation process on Thursday.
The outgoing government includes conservatives, socialists and technocrats appointed directly by the monarch, including the powerful interior minister.
Ultimate power remains with Mohammed VI, 44, who is the country's executive head of state, military chief and religious leader.
El Fassi is the third prime minister to serve under the king, who took the throne in 1999.
Mohammed has been praised as a modernising monarch, granting more power to women and founding the Equity and Reconciliation Commission, which exposed abuses committed against Moroccans under the 38-year rule of his father, King Hassan II.
However, human rights activists say that the king's regime still carries out crackdowns on press freedom, and that hundreds of innocent people have been arrested and tortured in so-called anti-terror sweeps by Moroccan police.