On Tuesday, congress voted to remove his immunity from prosecution amid corruption allegations.
Prosecutors accuse the president of masterminding a scheme to defraud the customs service of millions of dollars, allegations he denies.
A judge has barred Perez Molina from leaving the country.
The president, whose term runs out in January, will now be summoned to appear before a court.
The detention order was signed by judge Miguel Angel Galvez, the prosecutor’s office said.
A spokesman for Perez Molina had earlier said the president would be “very respectful and submit himself to the rule of law”.
All members of congress present at the vote endorsed a move to strip the president of his immunity. They included members of the president’s own party.
A previous vote to remove his immunity failed last month, but since then, more details of the corruption scandal have emerged and calls for the president to resign have increased. (BBC)