Messi was replaced by Robert Taylor in the 37th minute with the score tied at 0-0, taking off the captain's armband and handing it to DeAndre Yedlin.
The seven-time Ballon d’Or winner has been a terror from his first game scoring nine goals in six matches powering Miami into the Leagues Cup final on Saturday where they will face Nashville SC.
Philadelphia, who made the MLS Cup final last year and have a dominant record at home, were poised to be Miami's biggest test since the latter added the Argentinean striker to their roster last month.
Messi scored in his third consecutive match for Inter in a 3-1 victory over Orlando City last week, helping them move into the last 16 of the tournament.
Kickoff was delayed by 95 minutes because of a thunderstorm, but once the match got under way, Messi took little time to settle down and opened the scoring in the seventh minute.
Messi drew a foul about 25 yards from goal in the dying seconds and stepped up to deliver what everyone came to see as his free kick sailed into the top left corner and sent the crowd into delirium.
Alba arrives on a free transfer after his Barcelona contract was terminated by mutual agreement in May after 11 years in the club.
"I didn't even know whether Messi was in the group chat yet, but he popped up straightway and said, 'How many do you need though?' Straightaway like that.
"This happens to us even on a personal level; sometimes we associate the United States, Miami, holidays - this isn't that." he added. "We want to compete... they are not footballers who are going to come here to not compete."
Managing owner Jorge Mas added: "We feel he is a coach who matches our ambitions and we're optimistic about what we can accomplish together. Tata has coached at the highest levels and we believe that experience will be hugely beneficial to us."
The 34-year-old will be reunited with his friend and ex-Barca team mate Lionel Messi after not renewing his contract at the Nou Camp following an 18-year stay.
"My stay in Paris started with a very difficult adaptation, much more than I expected, even though I had people I knew in the dressing room. It was difficult to adapt, the change, arriving late, not having a pre-season, adapting to the new club, the new way of playing, new teammates, the city...It wasn't easy for me or for my family," he told BeIN Sports.
"Barcelona president (Joan) Laporta understood and respected Messi's decision to want to compete in a league with fewer demands, further away from the spotlight and the pressure he has been subject to in recent years," the LaLiga side said.
Beckham has increased his ownership stake in Inter Miami, the Major League Soccer (MLS) club said on Friday.
Jorge Mas, the co-owner of Major League Soccer team Inter Miami, said he is confident Lionel Messi will join them if he decides to leave Barcelona.
David Beckham's tortuous quest to find a home for his Inter Miami Major League Soccer franchise received a boost on Friday after a Florida judge approved plans to build a new stadium in neighbouring Fort Lauderdale.