The match offers Argentina an immediate chance for revenge for their agonising 1-0 extra-time defeat to Germany in the World Cup final last month.
Messi suffered the injury in Barca's 1-0 win away to Villarreal on Sunday and will also miss a charity match in Rome on Monday.
"Leo Messi will remain in Barcelona as a precaution due to a strain in his right adductor," Barca said in a statement on their website.
"Barca's number 10 will miss the match for peace in Rome this evening and will also not be able to participate in the match between Germany and Argentina.