He was appointed crown prince and deputy prime minister by royal decree, but he retains the defence portfolio and still controls oil and economic policies. That's something closely followed by fund managers and could mean a lot more foreign investment coming into the kingdom.
Although Mohammed bin Salman's promotion was expected among close circles, the timing was a surprise, with the kingdom facing heightened tensions with Qatar and Iran and locked in a war in Yemen.
The royal decree issued Wednesday stated that "a majority" of senior royal members - 31 out of 34 - from the so-called Allegiance Council support the recasting of the line of succession.
Oman has strained ties with Saudi Arabia over serving as a diplomatic channel for the West to Iran.
Even as deputy crown prince, Mohammed bin Salman has been responsible for running Saudi Arabia's war in Yemen, dictating an energy policy with global implications and spearheading plans for the kingdom to build an economic future after oil.
Despite his ambitions, which include overhauling the economy to make it less reliant on oil, the prince has faced failures and criticism for the Saudi-led war in Yemen, which he oversees as defense minister.
Though his image remained on billboards and atop buildings throughout Saudi Arabia, Mohammed bin Nayef appeared to be slipping in profile and was not believed to have played a significant role in Saudi and Emirati-led efforts to isolate Qatar for its support of Islamist groups and its ties with Iran.
"Experts have said that Bin Salman is different than other Saudi leaders in that he had been educated in the kingdom - he wears traditional dress and is popular with young Saudis".
Ulrichsen tells The Associated Press that Mohammed bin Salman's appointment also removes the challenge of having an increasingly elderly set of royals rule the kingdom.
Muhammad bin Nayef was the First Deputy Prime Minister and the Minister of Interior of Saudi Arabia.
Iran has called on Saudi Arabia to immediately release three detained Iranians that it says were fishermen but that Saudi authorities say were trying to carry out an attack.
His appointment completes a gradual removal of powers from Mohammed bin Nayef, 57, who has been fired, with his rise symbolising the hopes of Saudi's youthful population, more than half of which is under 25.
Prince Mohammed bin Salman replied: "We will not give up taking your guidance and advice".
The U.S. already is helping the Saudis with intelligence and logistical support for the bombing campaign in Yemen, and the Trump administration has signaled it could assist with greater intelligence support to counter Iranian influence there.
He is also the chairman of the new Council for Political and Security Affairs. The conflicts have deepened Sunni-Shiite enmity between hard-liners on both sides.