Argentina were 3-1 up by the break courtesy of two strikes from Gonzalo Higuain and one from Sergio Aguero while Jonas Olsson was on target for the Swedes.
Argentina had been held 0-0 by Saudi Arabia in their last friendly international while Sweden recorded a 4-2 win over England with Zlatan Ibrahimovic famously grabbing all four goals.
Ibrahimovic and Messi went into the game leading the goal-scoring charts in their respective leagues. Messi has 34 in La Liga with Barcelona while Ibrahimovic has hit 20 with Paris Saint-Germain in France.
The south Americans dominated against a team who held them to a 1-1 draw at the 2002 World Cup, a result that caused Argentina’s early exit.
Javier Mascherano and Pablo Zabaleta were the sole survivors from that game while Sweden gave squad debuts to goalkeeper Kristoffer Nordfeldt, Joel Ekstrand and Jimmy Durmaz.
Argentina were ahead after just three minutes when Real Madrid striker Higuain scored after neat approach work from Angel di Maria and skipper Messi.
West Brom defender Olsson pulled the Swedes level after 18 minutes with a header from a corner, but that respite lasted barely a minute when Aguero, the Manchester City star, was set up by di Maria to restore Argentina’s lead.
In the 29th minute, Higuain made it 3-1 after a Messi free-kick was only parried by the keeper.
Ibrahimovic was substituted at the interval before Messi had a goal ruled out when a sweet lob was judged not to have crossed the line.
“For me it was a goal, but that’s it. It’s important that the team won,” said Messi.
The contest petered out with a host of replacements upsetting the pattern of the game before Rasmus Elm hit a consolation for the hosts in the fifth minute of injury time.
Both sides will now set their sights on World Cup qualification with Sweden facing Ireland on March 22 and Argentina tackling Venezuela on the same day.