Goals from Argentine forward Facundo Farias, Spanish full-back Jordi Alba and substitute Leonardo Campana of Ecuador earned Miami a statement victory that moves them within nine points of the playoff places with nine games remaining.
Messi’s first MLS appearance in Los Angeles, attracted a capacity crowd, swollen by a host of A-List celebrities including Leonardo DiCaprio, Selena Gomez and Prince Harry.
But the home fans left frustrated as last year’s MLS Cup winners wasted a series of chances.
French-born Gabon international Denis Bouanga had the first opportunity, bursting goalwards but with Mexican Carlos Vela unmarked to his right, unwisely chose to shoot and his effort was blocked — to the fury of his teammate.
Bouanga had another great chance in the 11th minute after a fine through ball from former Italy defender Giorgio Chiellini but Miami keeper Drake Callender pulled off an excellent save.
After surviving those early scares, Miami took the lead in the 14th minute when Tomas Aviles split the LAFC defence to find Farias who beat John McCarthy with a low shot on the slide.
Miami struggled to contain Bouanga but the LA forward was again unable to make the most of his opportunity when he burst through the middle but fired wide.
Mario Gonzalez should have done better when he was given space for a shot but blasted into the side-netting as Miami were increasingly threatening on the counter.
Paraguay midfielder Diego Gomez broke forward and played a clever back-heel to Messi but the Argentine’s shot was weak and easily dealt with by McCarthy.
Before the interval, Messi had his best chance of the game, again set up by the outstanding Gomez, but one-on-one with McCarthy, Messi saw his lofted shot pushed away by the LAFC keeper.
LAFC paid the price for the wastefulness in front of goal in the 51st minute when Miami’s former Barcelona trio comb ined in style.
Spanish midfielder Sergio Busquets fed Messi who picked out the overlapping Alba and he burst into the box to score with a cool, left-footed finish.
Miami were in firm control and wrapped up the win in the 83rd minute when Messi burst from midfield and slipped the ball outside to Campana who made no mistake with a curling finish.
“You know what Leo is, what he can give on the pitch. He gets the best (out) of everyone,” said a beaming Campana.
“Right now, the goal is to achieve the playoffs and I hope we can do it to give happiness to the people of Miami,” added the striker.
LA got a 90th-minute consolation via Ryan Hollingshead’s glancing header from a corner and while the third-placed team in the Western Conference should have little trouble making the playoffs, they had been given a lesson in finishing.
Miami were bottom of the East and winless in 11 games in MLS before Messi’s arrival and after winning the Leagues Cup, the Florida club have won two and drawn one in regular season action.
“It was a nice test for us to see where we stood, what we were able to do on a difficult ground against a very good opponent, the winners last year and we earned a very important victory for what is coming,” Messi told broadcasters Apple TV.
“This group grows more every day, we have been saying it since the beginning of all this. We were lucky to get a tournament and get into a final and now the goal is to get into the playoffs and fight for the league,” he added.
“I feel good physically. Thank God I can continue playing and help the team in whatever way I can and hopefully we continue in this dynamic,” he added.
In Sunday’s other game, last year’s runners-up, the Philadelphia Union, beat the New York Red Bulls 4-1 to keep their playoff hopes on track.
The score was 1-1 when Red Bulls’ Sean Nealis was sent off after handling the ball and picking up a second yellow card.
Philadelphia took full advantage of the extra man after the break with goals from Jamaican Damion Lowe, Argentina Julian Carranza and Hungarian Daniel Gazdag.