Messi missed Barcelona's first four league matches of the season with a calf problem, before returning for a 30-minute appearance off the bench in the Champions League last week against Borussia Dortmund.
That was followed by another appearance off the bench, this time with Messi playing the second half of Barcelona's 2-0 defeat in La Liga on Saturday against Granada.
The Argentina star finally made his first start of the season on Tuesday – his 400th La Liga career La Liga start – but he only lasted 45 minutes and was replaced by Ousmane Dembele at half-time with Barca ahead 2-1.
Messi took a blow to his left leg in the first half and received treatment but after testing the problem out on the pitch, Barca manager Ernesto Valverde decided to take the Argentine star off.
Dembele himself came on for his first appearance in more than a month, with the French winger having been injured in Barcelona's season-opening defeat to Athletic on August 16.
Barca would go on to win the match 2-1, with Arthur Melo's stunner from long range proving to be the winner.
After the game, Valverde confirmed that Messi had suffered a groin injury.
"When something happens to Messi the entire world stops, not only on the pitch but fans too," Valverde said in his post-game press conference.
"It happened when he suffered problems in his arm [last season], now he is suffering a small pain in the adductor muscle and we didn't want to take risks."
Asked if Messi was already ruled out for Saturday's game at Getafe, Valverde replied: "We will see tomorrow but we won't take any risks because he just recovered from an injury."
Tuesday marked the highly anticipated debut of Barcelona's new attacking trio of Messi, Luis Suarez and Antoine Griezmann.
Early returns were promising, with Griezmann giving Barcelona an early lead after heading home Messi's corner kick.
But the trio would end up getting just 45 minutes together as Messi will now have a new injury to concern himself with in the season's early going.
Barcelona will hope that Messi's latest injury problem is nothing serious, with the Blaugrana having gotten off to a stuttering start in 2019-20.
Valverde's side have begun the Liga season with three wins, two defeats and one draw, while also drawing their opening Champions League match against Dortmund.
Barca will face a tricky away trip to Getafe in La Liga on Saturday before hosting Inter in the Champions League four days later.
On Monday, Messi won the Best FIFA Men’s Player award ahead of fellow finalists Virgil van Dijk and Cristiano Ronaldo.
It was the sixth time that the 32-year-old has won the prize given out to the world's best player.