Guardiola signed a new two-year deal at Manchester City on Thursday, prompting more speculation the club may be able to convince Messi to move to the Etihad Stadium if he leaves Barcelona as a free agent in the summer.
The City boss insists he wants Messi to stay in Spain but made sure he left the door open for the 33-year-old to join him in Manchester.
"Lionel Messi is a player from Barcelona," Guardiola told a news conference on Friday.
"If you ask me my opinion as a person, I have a huge gratitude for what Barcelona has done for me. In the academy as a football player and after as a manager it gave me absolutely everything.
"What I want is[for him] to finish his career there. I would love it, I would wish it. That is what I said I don't know how many times maybe a thousand times.
"I would like as a Barcelona fan for Leo to finish there. But he finishes this year the contract and I don't know what's going to happen in his mind. Right now he is a Barcelona player and the transfer market will be in June and July."
Messi stated publicly in the summer he was unhappy at Barcelona before agreeing to stay for at least one more year.
Sources told ESPN that City were ready to make an offer if he had secured his release from the club and consider themselves to be in a good position should he become available at the end of the campaign.
Messi cast further doubt over his future during the international break, saying he is "tired of always being everyone's problem at the club."