"The two leaders will review advances on different issues in the bilateral relationship," the Mexican foreign ministry said on Twitter.
The White House also confirmed the pair would meet on the sidelines of the summit, which will be held in Hamburg, Germany on July 7 and 8.
In January, Pena Nieto cancelled a trip to Washington in response to Trump's insistence that Mexico pay for his planned border wall, plunging the countries' relations into their biggest crisis in decades.
Trump and Pena Nieto first met in August 2016, when the former was still a candidate.
That visit turned into a public relations nightmare for Pena Nieto, who was lambasted for welcoming the brash Republican billionaire despite his insults and threats on Mexico.