The two veterans were on the score sheet as Argentina defeated Venezuela 3-0 in Buenos Aires on Friday.
The encounter was Argentina's final home game in the World Cup qualifiers, with the South American champions already guaranteed a place in Qatar later this year.
Di Maria has 121 caps and 24 goals, including the winner in last summer's Copa America final against Brazil.
"I'm just going to say thank you for the enormous love I have received," he wrote on his Instagram page.
"I always dreamed of everything I lived on this beautiful night. It was probably my last match with this shirt in Argentina, and being able to say that it was a wonderful night is an understatement.
"Thank you, thank you and a thousand times thank you.
"Now to congratulate the whole team for the great match that was played, a perfect match by all. We continue growing and dreaming together. Let's go Argentina!!!"
Messi has 159 caps and 81 goals for La Albiceleste and was captain when Argentina lifted South America's flagship tournament for the first time in 28 years.
"I don’t know what I will do after the World Cup. I am thinking about what is coming," Messi told reporters after the Venezuela win. "After Qatar I will have to reassess many things."
He added: "I don’t know [about playing on], the truth is I don’t know. I think about what's coming next, only think about facing Ecuador [on Tuesday]. The preparation matches in June and September.
"Let’s hope these go the best way possible. But for sure after the World Cup many things will change."