But his prominence — not just on the court, but in the streets as well — is so well established that masks with his face were sold for Carnival, amateur musicians have composed songs about his handling of the corruption trial and posted them on YouTube, and demonstrators during the huge street protests that shook the nation this year told pollsters that Mr. Barbosa was one of their top choices for president in next year’s elections.

While the protests have subsided since their height in June, the political tumult they set off persists. The race for president, once considered a shoo-in for the incumbent, Dilma Rousseff, is now up in the air, with Mr. Barbosa — who is now so much in the public eye that gossip columnists are following his romance with a woman in her 20s — repeatedly saying he will not run.

“I’m not a candidate for anything,” he says.

But the same public glare that has turned him into a celebrity has singed him as well. While he has won widespread admiration for his guidance of the high court, Mr. Barbosa, like almost every other prominent political figure in Brazil, has recently come under scrutiny. And for someone accustomed to criticizing the so-called super-salaries awarded to some members of Brazil’s legal system, the revelations have put Mr. Barbosa on the defensive.

One report in the Brazilian news media described how he received about $180,000 in payments for untaken leaves of absence during his 19 years as a public prosecutor. (Such payments are common in some areas of Brazil’s large public bureaucracy.) Another noted that he bought an apartment in Miami through a limited liability company, suggesting an effort to pay less taxes on the property.

In statements, Mr. Barbosa contends that he has done nothing wrong.

In a country where a majority of people now define themselves as black or of mixed race — but where blacks remain remarkably rare in the highest echelons of political institutions and corporations — Mr. Barbosa’s trajectory and abrupt manner have elicited both widespread admiration and a fair amount of resistance.

As a teenager, Mr. Barbosa moved to the capital, Brasília, finding work as a janitor in a courtroom. Against the odds, he got into the University of Brasília, the only black student in its law program at the time. Wanting to see the world, he later won admission into Brazil’s diplomatic service, which promptly sent him to Helsinki, the Finnish capital on the shore of the Baltic Sea.