King Salman's decree also means Prince Mohammed bin Salman (31), will become deputy prime minister while continuing as defence minister.
Prince Mohammed bin Nayef (57) has been removed from his role as head of domestic security, state media say. He has pledged allegiance to the new crown prince, his younger cousin.
Why this so significant? Saudi Arabia has typically been ruled by kings in their 70s or 80s. Prince Mohammed bin Salman's rapid ascent is seen by the younger generation as a sign that things are changing.
Before his latest promotion, he was responsible for leading Saudi Arabia's war in Yemen, overseeing the kingdom's energy policy and economic reform. He must have already ruffled a lot of feathers in a royal family that was used to being presided over by a succession of elderly men, the BBC reports.
His father King Salman is 81 and reportedly not in the best of health, our correspondent adds. Prince Mohammed bin Salman could, potentially, lead Saudi Arabia for decades, heralding a long period of internal stability.
However, the new crown prince is close to US President Donald Trump, and could ratchet up pressure against Iran - which would raise tensions in the region.
The rise of Prince Mohammed bin Salman has been meteoric. He himself as simply "a lawyer". Today he is a heartbeat away from ruling the most powerful country in the Arab world.
Despite being the driving force behind Saudi Arabia's damaging and inconclusive military campaign in Yemen, he is largely popular at home, especially with younger Saudis.
He has swept away many of the ineffective timeservers in government offices and replaced them with young, Western-educated technocrats. He has set out a possibly over-ambitious development plan, "Vision 2030", and announced plans to sell off part of the vast state-owned oil company, Saudi Aramco. He has also forged ties with Washington and the Trump administration.
But his biggest and most risky move may yet prove to be his bid to curb the power of the conservative religious establishment. Washington likes this move, but others closer to home do not.