The Barcelona forward missed Friday's 2-0 win for the Albiceleste over Italy in Manchester after feeling discomfort in his hamstring and right adductor, but was expected to feature against La Roja in Madrid.
Argentina boss Jorge Sampaoli told the media that his captain was fit and feeling good in Monday's pre-match press conference, saying that the player would tell him if there was any problem.
"There is no risk," he said. "If there was any risk [of injury or aggravating the problem by playing], Leo would have said. He told us before the last friendly. He was tested yesterday and tried again today. If he continues like this, he will have no problems playing."
However, the five-time Ballon d'Or winner did not feel right on Tuesday morning, Goal has learned, and told the coaching staff that it would be better if he sits out against Spain.
The news will be setback for Sampaoli, with only one match left – a friendly in Israel in June – ahead of their participation in the World Cup, with the Argentina boss having hoped to try out his system with Messi in the games against Italy and Spain.
While Messi will be at the heart of Argentina's bid for World Cup glory, Sampaoli admits he is not going to try teaching the attacker anything.
"It is impossible to teach something to Messi. His level is unattainable. You have to understand Messi, not teach him," he said.
"In training you have to try to cause situations in which his comfort will be optimal. From there, you have to build a team related to this story.
"You have to learn from these kind of players that come around every so often. You have to learn how to go with them, not even in coaching terms, but in the sense of how to bring harmony to him, surrounding him with the right atmosphere.
"In that sense, Leo is very open to interact a lot with what he feels inside the pitch. The interpretation of a player with such a capacity inside the pitch gives the coach a better perspective of what is coming because his lenses are probably much more developed than ours.
"Luckily, the dialogue with him is very constant. I always see him at a high level of compromise with the national team and its wishes. We will go through this together."
Spain versus Argentina kicks off at 21:30 CET at the Wanda Metropolitano on Tuesday.