Ouattara had previously said he would run if two of his longtime political rivals were candidates, defying opponents who say the constitution does not give him the right to seek a third term.
But he declared in a speech before lawmakers that he would step down after 10 years in office.
“I have decided not to be candidate in the Oct. 31 presidential election and to transfer power to a new generation,” Ouattara said, prompting applause, cheers and gasps from audience members in the capital Yamoussoukro.
The move leaves the presidential race wide open and could set off a succession battle within Ouattara’s own coalition.
Ouattara was first elected president of Ivory Coast, the world’s leading cocoa producer, in a 2010 election that sparked a brief civil war . Around 3,000 people died in the violence.
Political tensions have been on the rise again in recent months after the government issued an arrest warrant for Guillaume Soro, a presidential candidate and former rebel leader. His forces swept Ouattara to power in 2011 but he has since fallen out with the president.
Ouattara’s two main rivals, Gbagbo and another former president, Henri Konan Bedie, have not yet said whether they will be candidates in October.
Leaders from across the political spectrum welcomed Ouattara’s announcement, which bucks a trend in which several African leaders have sought to circumvent constitutional term limits to stay in power.
“It’s a feeling of respect for his decision not to run,” said Pascal Affi N’Guessan, a veteran leader from Gbagbo’s FPI party. “We have to give him credit.”
Ouattara is widely expected to back his prime minister, Amadou Gon Coulibaly, for president, although some of his allies fear Gon Coulibaly lacks the charisma to run an effective race.
It is not clear if Gbgabo will be able to run. He was acquitted last year by the International Criminal Court in The Hague of crimes against humanity for his role in the civil war but remains in Europe pending an appeal by the prosecution.
In his speech, Ouattara also announced several proposed revisions to the constitution but insisted none of them would be used to exclude rivals from the presidential election, as some in the opposition fear.