Venezuelan international Josef Martinez, Messi’s former Barcelona team-mate Jordi Alba, and substitute David Ruiz scored Miami’s other goals, with Alejandro Bedoya the lone scorer for outgunned Philadelphia.
The result leaves Messi preparing for the 42nd final of his career with Miami facing Nashville SC in Saturday’s final of the World Cup-style tournament for teams from Mexico and Major League Soccer.
Nashville booked their place in the final later Tuesday with a 2-0 win over Mexican side Monterrey and will host the final this weekend.
Miami meanwhile were left basking in a victory which also sees them qualify for the CONCACAF Champions Cup regional tournament next season — potentially opening up a route into FIFA’s expanded Club World Cup in 2025.
“Our goal was to qualify for international competition next season and we’ve done that tonight,” said Miami head coach Gerardo ‘Tata’ Martino.
“This most important thing was achieving qualification for Concacaf Champions Cup, and now we have to prepare to win this tournament, which has us feeling very motivated and confident.”
Miami’s semi-final in Philadelphia was in theory supposed to be the toughest assignment yet faced by Messi since he made his debut for Miami on July 21 after joining from Paris Saint-Germain.
Philadelphia are one of the strongest teams in MLS, and are third in the Eastern Conference standings while Miami are bottom of the table.
The Union have also been practically invincible at home, losing only once in their previous 38 games at Subaru Park.
But the home side were left in disarray just three minutes after kick-off as Miami took the lead.
A long ball forward from Ukrainian defender Sergii Kryvtsov sowed panic in the Union back line, and Martinez latched onto the pass before rifling a shot past diving Philadelphia goalkeeper Andre Blake.
Philadelphia should have equalised five minutes later when Hungary international Daniel Gazdag went through on goal only to shoot straight at Miami goalkeeper Drake Callender.
Gazdag had another good chance after 19 minutes, but saw his curling shot from the edge of the area fly just wide.
If that chance encouraged Philadelphia, the optimism was short-lived as Messi struck once again to punish slack Union defending.
Damion Lowe was caught napping and Martinez spun away from the defender to release Messi, who was given far too much time and space to direct a fierce low strike from outside the area into the bottom corner past Blake.
Philadelphia responded with sustained pressure, and Gazdag tested Callender from long range once more with a rasping shot on 29 minutes.
Although Union enjoyed plenty of territory and possession, it was Miami who struck the decisive blow on half-time.
Finland international Robert Taylor held the ball up well in midfield and took his time before picking out the overlapping Jordi Alba.
The former Barcelona star controlled and buried a clinical finish to leave Miami 3-0 up at the break.
Philadelphia coach Jim Curtin threw caution to the wind in the second half, tweaking his formation to add an extra attacker.
But Union squandered two good openings when Chris Donovan rounded Callender on 55 minutes but then shot over the bar.
Jakob Glesnes also wasted a gilt-edged opportunity from close range, hooking over the bar on 66 minutes.
Bedoya gave Philadelphia hope in the 73rd minute when he swept in from a chaotic corner, but Miami snuffed out any chance of a fightback when Ruiz restored the visitors’ three-goal advantage six minutes from time.