The Argentina international was withdrawn after 29 minutes of the Spanish champions' 2-0 victory away to Almeria on Saturday.
Messi, 26, had put the Catalan side into a 1-0 lead before being forced off, with Adriano Correia adding a second after half-time.
And the club announced on Sunday that Messi will now miss Tuesday's UEFA Champions League fixture against Celtic and Saturday's La Liga fixture with Valladolid at Camp Nou.
However, Barcelona are hopeful of having Messi back after the international break in time for the away trip to Osasuna on October 18, with Real Madrid visiting a week later.
A statement on the club's website read: "Lionel Messi has a small injury to the fibrillar biceps femoris of the right leg.
"The Argentinian will miss approximately two to three weeks, which will force him to miss two games Barcelona have this week: Tuesday against Glasgow Celtic and Saturday at Camp Nou against Valladolid."
Messi had been plagued with a similar issue at the start of the campaign, but has still been an integral part of a Barcelona side that has won all seven of their opening league fixtures.
The Ballon d'Or winner has already contributed eight goals to the club's La Liga campaign this season.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.