SÃO PAULO, Brazil — The man many Brazilians thought would shake up October’s presidential election, Joaquim Barbosa, Brazil’s first black Supreme Court justice, announced on Tuesday that he would not run, upending the already unpredictable race.

Mr. Barbosa, 63, had joined the Brazilian Socialist Party in April, raising the prospect of a presidential bid. Even without declaring his candidacy, he was the choice of 10 percent of the respondents in a nationwide poll, thanks to his image as an anti-corruption crusader at a time when all of the major parties and many top politicians have been tainted by a wide-ranging bribery scandal.

But on Tuesday, in a message on Twitter, he said: “It’s decided. After many weeks of reflection, I have finally reached a conclusion. I do not intend to be a candidate for the president of the Republic. Decision strictly personal.”