With just three weeks until the runoff, Bolsonaro holds a commanding lead.
Former Army captain Mr. Bolsonaro ended up with 47 percent of valid votes, three points shy of the overall majority he would have needed to be victorious in the first round.
This election has surfaced deep divisions in Latin America's largest democracy, NPR's Philip Reeves reports from Rio de Janeiro, "between those who think Bolsonaro will combat rampant crime and corruption and others alienated by his misogynist and racist comments, and his admiration for Brazil's past military dictatorship".
With no backing from major parties and little funding, Mr Bolsonaro relied on his skilful use of social media during the campaign.
He gained momentum after a near-fatal stabbing at a rally one month ago that kept him from campaigning.
The Workers' Party has been at the centre of the corruption investigation and has struggled to shake off criticism under its new leader Mr Haddad. "We are on an upward trajectory and are confident that the Brazilian people want to distance themselves from socialism". "We have to remain mobilized".
Many voters also like his promises to tackle corruption and to cut climbing public debt through privatizations, as well as the devout Catholic's family-first stance.
Supporters rallying outside his Rio de Janeiro home waved the green-and-yellow national flag, chanting "Our president!" when he returned from voting, accompanied by a nurse, in a convoy of black SUVs.
Another Bolsonaro voter, Orlando Senna, said: "He is an example of honesty".
"I am certain that if this hadn't happened, we would have known the name of the president of the republic tonight", Bolsonaro said in a live Facebook video feed.
In Sao Paulo, supporters celebrated on a main avenue with a giant inflatable doll in military uniform depicting Bolsonaro's running mate, retired general Hamilton Mourão.
Mr Bolsonaro's win was predicted in the polls but the extent of his victory came as a surprise.
But his supporters, like 53-year-old lawyer Roseli Milhomem in Brasilia, said they backed the veteran lawmaker because "Brazil wants change".
Lula was blocked from the race after being sentenced to 12 years in prison on corruption charges in one of the world's biggest-ever political graft scandals.
Bolsonaro is riding a wave of anger at the establishment over one of the world's largest political graft schemes and rising crime in the country with the most murders in the world.
Fernando Haddad, who cast his ballot in São Paulo, gestured towards rival candidates Ciro Gomes, Marina Silva, and Henrique Meirelles, in a bid to win their support for the runoff.