The embattled leader will have 24 hours to respond to questions from the federal police in a case involving Brazil’s largest meat company JBS, a court statement said.
The court authorisation of Temer’s testimony was expected, as police continue their investigation.
At the heart of the case is a conversation Temer had with an executive from the JBS meat packing business in which the president allegedly blesses monthly payments of hush money to jailed former lower house speaker Eduardo Cunha.
Cunha is in prison after being convicted of bribe-taking, but as a powerful insider he has long been rumoured to be threatening to spill secrets on other politicians.
Prosecutors accuse Temer of corruption, obstruction of justice and criminal organisation. He has said he did nothing wrong and will not resign.
Lawmakers have filed 16 separate demands for Temer’s impeachment. Brazil’s political crisis stems from the gigantic corruption investigation known as "Car Wash."
Scores of politicians have been indicted or subjected to probes into alleged bribe-taking and embezzlement, with Temer only the latest and highest-profile to be pulled into the maelstrom.