Pena Nieto called on Videgaray to boost Mexico's place in Latin America as well as within the Group of 20 economic powers.
President Enrique Pena Nieto's announcement followed weeks of speculation that his former finance minister and close confidant was set for a triumphant return after Trump's victory in November.
Pena Nieto said Videgaray was instructed to "accelerate dialogue" with the US president-elect's team in order to establish the basis for "constructive" relations as soon as Trump succeeds Barack Obama as president on January 20.
Pena Nieto said Videgaray will shepherd bilateral relations regarding immigration, security and trade to "promote Mexico's interests without diminishing our sovereignty and the dignity of Mexicans."
At the same time, Pena Nieto called on Videgaray to boost Mexico's place in Latin America as well as within the Group of 20 economic powers.
Videgaray later addressed foreign ministry officials, telling them, without naming a country, that "the challenge is enormous, the threats are there, but the opportunities and our strengths are also enormous."
Videgaray is replacing Claudia Ruiz Massieu who, according to diplomatic sources, had opposed the Republican billionaire's August 31 visit to the official Los Pinos residence.
Trump's meeting with Pena Nieto had shocked Mexicans, who were angry at the candidate for calling migrants from their country "rapists" while vowing to deport millions and make Mexico pay for a huge border wall.
Mexicans lashed out at Pena Nieto, whose approval rating was already below 25 percent, for holding back criticism of Trump during their joint press appearance.
Videgaray resigned as finance minister a week later and Pena Nieto admitted that his friend had been "greatly weakened" by his role in arranging Trump's visit.
The Mexican government said Democratic candidate Hillary Clinton had also been invited, but she declined the offer.
Trump's victory over Clinton in the November 8 election has led to Videgaray's rehabilitation.
After the election, former Mexican president Vicente Fox, a major Trump critic, tweeted that Pena Nieto had been a "visionary" and that Videgaray "got it right."
Now Videgaray, an economist trained at the prestigious Massachusetts Institute of Technology (MIT), faces the tough task of guiding Mexican diplomacy in the face of an incoming US administration that has vowed to upend economic ties with Mexico.
"Even if Videgaray is the right person to lead the negotiations, it doesn't guarantee that things will turn out well for Mexico," prominent political analyst Jose Antonio Crespo told AFP.
Videgaray organized the visit thanks to a Mexican businessman and friend who put him in contact with Trump's son-in-law and key adviser, Jared Kushner, according to news reports.
Trump had words of praise for Videgaray when he resigned, saying "Mexico has lost a brilliant finance minister and wonderful man who I know is highly respected by President Pena Nieto."
While Pena Nieto has voiced optimism that relations with Trump could be beneficial to Mexico, his country's economy is already facing the effects even before the real estate mogul takes office.
The peso has fallen to record lows since Trump's victory and on Tuesday, US automaker Ford cancelled a $1.6 billion plant project in San Luis Potosi state following criticism from the president-elect.
"Videgaray has the tools to negotiate, he's prepared," Crespo said. "But the question is how willing Trump is to be flexible."