Bolsonaro won Sunday’s poll with 46.5 per cent of the vote, ahead of left-wing former Sao Paulo Mayor Fernando Haddad from the Workers’ Party on 28.5 per cent, CNN reported.
Bolsonaro’s lead, in a field of 13 candidates, left him just short of the 50 per cent needed to win outright and unable to avoid a runoff against Haddad on October 28.
A victory in the second round for former army captain Bolsonaro would signal a historic shift to the right in Brazil.
The Social Liberty party candidate has stirred controversy by making misogynistic and homophobic remarks and has often been compared to US President Donald Trump and the Philippines’ Rodrigo Duterte.
The campaign hit headlines last month when Bolsonaro was stabbed during a political rally in the city of Juiz de Fora, landing him in the hospital for several weeks.
Opinion polls released before the campaign closed predicted Bolsonaro could capture 35 per cent of the votes.
Thousands of people took to the streets throughout Brazil last week to voice their opposition to Bolsonaro, often comparing him to Adolf Hitler in posters and chants.
He once told a congresswoman during a parliamentary hearing that she did not deserve to be raped because she was “very ugly”, Brazil’s TV Globo reported.
He also said publicly that he would prefer to see his son “die in an accident” rather than a member of his family be homosexual.
Political divisions have deepened in Brazil as the country suffers from a prolonged economic recession and extreme violence, with murder rates reaching a record high last year.