The former Barca manager signed a contract extension with City this week which is set to keep him at the Etihad Stadium until 2023.
And his decision has ramped up speculation that City will make a move for Messi either in January or in the summer when he will be available for free.
“Lionel Messi is a player from Barcelona,” Guardiola told a news conference when asked about the possibility of signing the Argentine.
“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 Messi] 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 his 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."We have incredible games and targets and things we would like to achieve. That is the only thing in our mind. The rest I cannot say anything."
Messi has made it clear over the past year that he is unhappy following Barca’s problems both on and off the field.
It was further ignited this week when the 33-year-old returned from international duty to be met at the airport by a tax inspector and reporters asking him about his relationship with Antoine Griezmann.
Messi handed in a transfer request at the end of last season with City keeping an eye on the situation, but it was later withdrawn with Barca only allowing him to leave if his €700 million (£630m/$825m) release clause was met.
City is still thought to be his most likely next destination if he does leave Camp Nou over the next seven months.
Messi enjoyed the most successful period of his career when his mentor was in charge at Barca, winning two Champions League titles and the City boss has consistently called him the best player in the world.
Barca boss Ronald Koeman remains convinced that Messi will stay at the club and refused to answer questions on his future.
Meanwhile, Guardiola said that he had not considered joining another club before signing his contract, which was set to expire at the end of the season.
"I have just decided to stay here,” he added. “Just in case we felt the decision is not just mine, that it was enough I would have taken a break.
“I said when I signed the contract, we have many things to do."