Governing amid scandal is nothing new for Mr. Temer, a centrist who drifted to the right over the past year. Allies of his have been forced to resign from his cabinet over reports that they sought to stymie the extensive investigation into graft connected with Petrobras, the national oil company.

Mr. Temer, with approval ratings hovering around the single digits, had even expressed fury at the end of 2016 after one of his cabinet ministers secretly recorded their conversation, accusing the president of pressuring him to help an ally in a property deal. More recently, Mr. Temer was accused of negotiating a $40 million bribe in 2010 for his scandal-ridden Brazilian Democratic Movement Party, a claim that he denied.

But the newest scandal around Mr. Temer appears to be more destabilizing, raising the possibility of even greater turmoil in Brazil. The Supreme Court authorized on Thursday an investigation of the president. Adding to the pressure on Mr. Temer, the country’s economy remains weak after enduring a harrowing decline and surging unemployment, despite tepid signs of recovery.

If Mr. Temer resigns, the next in line of succession is Rodrigo Maia, the speaker of the lower house, who is facing his own federal graft investigation. Still, Mr. Maia could serve as president for only 30 days, according to Brazil’s Constitution, after which Congress would elect a new president to serve the remainder of Mr. Temer’s term, through 2018.

Critics of the beleaguered president have been organizing street protests calling for direct elections, a prospect feared by some allies of Mr. Temer over the potential for figures like Luiz Inácio Lula da Silva, a leftist and former president, to capitalize on the political tumult.

While Mr. da Silva is facing his own corruption investigations, he still ranks among Brazil’s most influential political figures, largely thanks to the vigorous expansion of antipoverty programs during his presidency from 2003 to 2010. Outspoken opponents of Mr. da Silva, such as Mayor João Doria of São Paulo, are also rising in national prominence.