Pena Nieto's Mexican government has been actively seeking new trade opportunities since US President Donald Trump came to office with a threat to curb Mexico's privileged access to American markets.
Mexico is currently in negotiations with the European Union to modernize a free trade agreement they signed 20 years ago.
Both Merkel and Pena Nieto vowed on Friday to conclude the expanded deal by the end of the year, as the German leader kicked off a two-day visit to Mexico.
"We hope the modernization of the free trade agreement between Mexico and the European Union leads to a significant increase in our trade relationship," Pena Nieto told a joint press conference.
Merkel praised Mexico's "strong commitment to free trade," in a veiled jab at Trump's attacks on globalization.
Both Merkel and Pena Nieto have been on the receiving end of some of Trump's most fiery attacks on trade.
The US president has triggered the renegotiation of the North American Free Trade Agreement (NAFTA) with Canada and Mexico, which he says has resulted in American jobs flooding south across the border.
Last month he also lashed out at what he called the United States' massive trade deficit with Germany, and accused the country of failing to pay its way in the Nato alliance.
Mexico and Germany did $17.8 billion in trade last year, and are keen to expand the relationship.
Major German automakers such as Volkswagen and Audi have opened large plants here, helping make Mexico the seventh-largest auto producer in the world.
Germany's foreign direct investment here totaled $2.4 billion last year, more than any other country except the United States and Spain.
Merkel, who is traveling with a large business delegation, was in Argentina - another Latin American powerhouse - on Thursday and Friday morning.
She will attend an economic forum Saturday before flying home.