Prosecutors said the operation had been carried out at the offices of Mossack Fonseca in Panama city "without incident or interference", media reported. Also read: I'm a law-abiding citizen, cooperating with Income Tax department: Amitabh Bachchan
The leaked 'Panama Papers' show how wealthy people use offshore firms to evade tax and avoid sanctions.
The firm has denied wrongdoing. It said it is the victim of a hack and that the information is being misrepresented.
Panamanian President Juan Carlos Varela has promised to work with other countries to improve transparency in its offshore financial industry.
Police carried out Tuesday's raid along with officials from an organised crime unit. Officers set up a perimeter around the headquarters while prosecutors entered the offices to search for documents.
The attorney general's office said the aim had been "to obtain documentation linked to the information published in news articles that establish the use of the firm in illicit activities".The statement added that searches would also take place at subsidiaries of the firm.
Panama government promised an investigation soon after news reports emerged more than a week ago based on more than 11 million documents from the firm.
Mossack Fonseca partner Ramon Fonseca said the company had been hacked by servers based abroad and has filed a complaint with the Panamanian attorney general's office.
Fonseca served as a minister in Valera's government but stepped aside earlier this year after separate allegations linked the firm to the corruption scandal engulfing the Brazilian state oil company Petrobras.
The leaked documents were passed to German newspaper Sueddeutsche Zeitung, which then shared them with the International Consortium of Investigative Journalists.
Mossack Fonseca said it has operated beyond reproach for 40 years and never been accused or charged with criminal wrongdoing.
Prosecutors said the operation had been carried out at the offices of Mossack Fonseca in Panama city "without incident or interference", media reported.
Also read: I'm a law-abiding citizen, cooperating with Income Tax department: Amitabh Bachchan