Messi captained Argentina in the tournament but they lost 2-0 to would-be champions Brazil in the semifinals on July 3 before going on to finish third.
"Messi said some beautiful words when we were eliminated by Brazil," Di Maria told ESPN Argentina. "Messi told us he was proud of the team we had built.
"That we had not been together much as some had not been called up [to the senior team] before. Yet, it felt as though we had all been together for many years.
"He said that we had all rowed in the same direction from the first day. That he was very proud of the youngsters for their commitment to this jersey and if they were there and gave what they gave at the Copa America, it was because they more than deserved to be there.
"Once he finished, everyone was in tears because it touched everyone's hearts, especially the youngsters.
"The young players are the ones that have to carry on in the same path. It will not be easy for them. They will have to work and continue giving their all as sooner or later, luck will be on our side."
Di Maria has represented Argentina since 2008 and like Messi, is yet to win a trophy with the senior team, having lost three straight finals in a three-year period, with the first coming at the 2014 World Cup against Germany.
Messi was criticised by his country men for not singing the national anthem and Argentina great Diego Maradona said the Barcelona star "lacked personality" to lead the Albiceleste.
While Argentina's trophy drought continued this summer, Di Maria said the Copa America showed "a new Messi."
"There was a lot of criticism that he didn't sing [the national anthem], that he didn't talk," Di Maria added. "This Copa America was different. He proved it. What made me happier was to see how he spoke in front of the group, how he spoke to reporters, what he said.
"The important thing is that Leo is like this. I like this Messi."
Messi is serving a three-month ban from international football and will only be able to return to play for Argentina on Nov. 3 after losing his appeal to have the punishment reduced.
The Barcelona captain was also fined $50,000 in August after accusing South America's governing body for football of "corruption" during the Copa America.