The victory at Rio de Janeiro's Maracana stadium ended Argentina's 28-year wait for a major trophy, and ended Brazil's unbeaten home record that stretched back more than 2,500 days.
Argentina had last tasted success at a major tournament in 1993 when the great Gabriel Batistuta's brace gave them a 2-1 win over Mexico in the Copa final in Ecuador.
It was the first time in six editions playing at home that Brazil had failed to lift the trophy.
And while 34-year-old Messi's odyssey has come to an end, Brazil's Neymar, five years his junior, is still without a major title at international level having missed the Selecao's win on home soil two years ago through injury.
Argentina edged a brutal and fractious affair thanks to Di Maria's goal on 22 minutes.
The 33-year-old winger ran onto Rodrigo De Paul's sumptuous through ball to lob Brazil goalkeeper Ederson with a first time finish.
Messi could have wrapped up the win two minutes from time but slipped when clean through with only Ederson to beat.
Di Maria the tormentor
In a frantic start, Argentina's burly enforcer Nicolas Otamendi was quickly in with his first foul while Brazilian midfielder Fred picked up the first booking after just three minutes for a studs up lunge at Gonzalo Montiel.
Brazil were unchanged from their semi-final win over Peru while Argentina coach Lionel Scaloni made five alterations, notably bringing in Di Maria -- who made an energetic and decisive entry off the bench against Colombia last time out.
The final was the first match of the tournament, which was originally due to take place last year, to allow in fans as 7,800 -- a tenth of the Maracana capacity -- took their seats after authorities partially lifted pandemic restrictions.
The first clear chance came on 13 minutes as Richarlison headed down Marquinhos's long ball into the path of Neymar but the Brazilian star was crowded out by a pair of defenders.
The brutal nature of the early challenges could be seen on the players' kits, with Neymar sporting ripped shorts and Lucas Paqueta being left with a hole in his sock following an intervention by Otamendi.
Argentina played with aggression and commitment, but no lack of quality with Di Maria tormenting Brazil's left back Renan Lodi, who probably should have cut out De Paul's pass for the winger's goal.
Di Maria had a shot from 20 yards blocked while Messi fired just wide following a 40 yard run.
Brazil struggled to create anything of note and even when they had a free-kick from shooting range, Neymar couldn't beat the wall.
When the hosts did finally maintain some pressure late in the first half, Everton's deflected strike bobbled though to goalkeeper Emiliano Martinez.
Brazil coach Tite was quick to act, bringing on forward Roberto Firmino for defensive midfielder Fred at half-time.
Richarlison had the ball in the net soon after but he was flagged offside.
And moments later Neymar teed up Richarlison but Martinez parried his near post effort.
Increasingly it descended into a fractious, niggly affair with little fluid play between fouls and a plethora of theatrics and petulant bickering.
It was playing into Argentina's hands as they looked to run down the clock and hold onto their slender lead.
Brazil managed to up the pressure again at the end of the half but they lacked a killer touch against some full-blooded defending -- Montiel even finished the game with his white sock soaked in blood.
When Brazil substitute Gabriel Barbosa fired a volley on target, Martinez was equal to it.
Messi slipped embarrassingly late on with a chance to clinch victory but it mattered little as moments later his teammates were tossing him in the air to celebrate their win.