Messi scored Barcelona's fourth goal in a 4-2 away win that carried the Catalans through to the semi-finals 6-4 on aggregate.
He was substituted two minutes later, in the 82nd minute, but Barcelona stress he is not carrying a significant injury.
Assistant head coach Jordi Roura said on fcbarcelona.com: "We brought Messi off the as a preventative measure. The adductor in his right leg was giving him problems. It's nothing serious."
Real Madrid await Barcelona in the last four, and Gerard Pique, who became a father this week before scoring against Malaga last night, is relishing that semi-final tussle.
The first leg takes place in Madrid next Wednesday, with the return at the Nou Camp four weeks later. Madrid are expected to be without injured goalkeeper Iker Casillas for both games.
Pique said: "It's exciting because it's a cup semi-final and because if you win you go onto the final.
"It's one of the most attractive matches of the year and we have been lucky enough to play it these past couple of years. First we have to play against Madrid, they will still be dangerous even though they will be missing important players."
Barcelona play Osasuna in the Primera Division on Sunday.