A former worker was given a suspended sentence of 17 months in prison and ordered to do 250 hours of social work, while the other person convicted got an €80,000 fine and a 22-month suspended jail term.
Three other former employees were cleared of charges. The firm is based in Baden-Württemberg and the case was heard at a court in Stuttgart.
Germany is among the world's top arms exporters, along with the United States, Russia, China and France, and all its defence equipment sales abroad are subject to government approval.
Prosecutors had charged that 15 shipments of the military-style weapons between 2006 and 2009 breached Germany's so-called war weapons control law because they ended up in especially violence-torn Mexican states in breach of the export licence.
The Mexican defence ministry, which is in charge of gun imports, had approved the import of 9,652 H&K rifles, of which 4,796 went to states with particular human rights concerns, including Guerrero, German newspapers have reported.
Activists say that G36 rifles were also sent to police in Iguala, Guerrero state, where the 43 students disappeared at the hands of corrupt police and were feared killed by a narco-gang in September 2014 in a case that sparked international condemnation.
A driving force in the investigation leading to the trial was German rights activist Juergen Graesslin, who first issued a criminal complaint against H&K staff over the Mexico sales in 2010.
The campaigner said it was well known that in the most conflict-torn Mexican states both police and narco-gangsters used the G36, and that “often the two groups cooperate”.