A spokeswoman for the firm said authorities suspected Heckler & Koch of breaching German arms export laws that forbid sales to zones of conflict.
The manufacturer, based in Oberndorf in the state of Baden-Württemberg, has allegedly sold rifles since 2005 to four Mexican states in which human rights abuses have taken place.
The firm has a lawful export licence to other parts of Mexico, a spokeswoman for the state prosecutor in the Baden-Württemberg capital Stuttgart said on Tuesday. However, the four states in question are excluded from this licence.
The United States cut aid to Mexico in September over what it deemed human rights abuses by Mexican soldiers battling drug gangs. Mexico's military is playing a leading role in Mexican President Felipe Calderón's war against drug cartels, but soldiers have faced growing accusations of arbitrary murder and torture. At least 21,000 people have died in drug-related violence since the crackdown began in December 2006.
Twenty investigators confiscated a large quantity of documents from Heckler & Koch's head office in Oberndorf. The firm confirmed it was being investigated but denied the accusations. It vowed to co-operate with authorities in the ongoing investigation.
Heckler & Koch is claiming it does not work with any particular state in Mexico, but rather sells weapons only to the responsible authorities under control of the Mexican Defence Ministry, according to public broadcaster ARD. This had been approved by German authorities, the firm says.
It has no control, it says, over how the ministry then distributes the guns.
Heckler & Koch also complained that the Stuttgart state prosecutor's accusations had not been presented in a legally clear way that the firm could review.