Now, Mr. Greenwald and Mr. Miranda — who ultimately took a seat in Congress — are under attack by Mr. Bolsonaro and his allies. They have faced death threats and, according to a conservative Brazilian website, the federal police are investigating Mr. Greenwald’s finances. Government officials have neither confirmed nor denied the report, but the suggestion that Mr. Greenwald is being targeted by the state for his news reports has ignited an outcry over press freedom in Brazil.

Mr. Greenwald — one of the two journalists who obtained and disseminated the trove of secret intelligence documents leaked by the National Security Agency whistle-blower Edward Snowden in 2013 — said he had doubted he would ever break a more consequential story. The Snowden revelations set off a global debate about government surveillance and privacy.

But the stakes of the exposé in Brazil seem higher in some ways, he said.

The information published by The Intercept Brasil, a news organization co-founded by Mr. Greenwald, challenged the integrity of a wide-ranging corruption investigation that ensnared some of the most powerful figures in Brazil’s political and business establishment over the past five years, landing many of them in prison.

Among them was the leftist former president, Luiz Inácio Lula da Silva, who was jailed and prevented from taking part in a presidential race in which he had a large lead over Mr. Bolsonaro.

The man presiding over that investigation, the federal judge Sérgio Moro, became a folk hero of sorts for many Brazilians fed up with graft and violence. Later nominated by Mr. Bolsonaro to be justice minister, Mr. Moro became one of the most popular members of his cabinet, lending legitimacy to the president’s promise to tackle rampant crime and crack down on corruption.