Valls, 54, announced Monday he would put himself in the running to become the Socialist Party candidate for next year's presidential poll and will have to go through primary elections to win the party nomination.
Cazeneuve, 53, is best known for overseeing the nation's security forces in response to a spate of terror attacks that hit the country, killing 229 people in two years. The deadliest were the Paris attacks last year
that left 130 people dead.
Cazeneuve is a trained lawyer but has had a long political career. In 1991 he became a councilor in the Cabinet of Thierry de Beaucé, then the secretary of state for international cultural relations, according to his biography on the Interior Ministry website.
He was elected a member of parliament in 1997 and has since served as minister of state for European affairs and minister of state for the budget, before being appointed interior minister.
Valls' resignation has given way to a Cabinet shake-up, with Bruno Le Roux, a ranking socialist in the French National Assembly, nominated as interior minister in Cazeneuve's place.
If Valls wins the Socialist nomination, he will likely face Francois Fillon of the Republican Party and Marine Le Pen of the far-right Front National in the first round of the presidential election next spring.
The race begins
President Francois Hollande of the same party announced Thursday last week that he would not seek a second term as his popularity ratings plunge.
It is the first time since 1958, when France's fifth republic was created, that an incumbent president has not sought reelection.
Hollande cited achievements under his watch, including opening up marriage to all couples, strengthening women's equality and fighting against discrimination.
He said unemployment had declined since the beginning of the year, but conceded "it remains at too high a level."
Valls who has also previously served as interior minister, said on Monday that he wanted an independent France "inflexible on its values, when facing Xi Jinping's China, Putin's Russia, Donald Trump's America, Erdogan's Turkey," referring to the leaders of those countries.
Fillon, 62, was elected the Republican Party candidate in primary elections. He has been dubbed a "French Thatcher" for his apparent admiration for Britain's "Iron Lady," Margaret Thatcher.
A lawyer who served as prime minister between 2007 and 2012 under Nicolas Sarkozy, Fillon has talked of ending France's famed 35-hour work week and getting tough with the country's powerful trade unions.
A hard line on immigration has also bolstered Le Pen, whose anti-Europe stance is gaining popularity among French voters.