Guardiola said: “Messi is a Barcelona player. I said it a thousand times. As a fan, I want Leo to finish there.”
Argentine playmaker Messi had looked set to join City after putting in a transfer request in August, only for Barcelona’s then-president Josep Maria Bartomeu to block the transfer.
Bartomeu then resigned in October but Messi’s future remains uncertain.
“His contract finishes this year [season] and I don’t know what will happen in his mind,” Guardiola said.
Paris St-Germain have also been linked with the 33-year-old, but every candidate in the Barcelona presidential election to be held in January has said it is a priority for them to persuade Messi to stay.
“I have huge gratitude for Barcelona and what they have done for me,” said Guardiola, who worked with Messi when managing the club between 2008 and 2012.
“In the academy, as a player and a manager, they gave me absolutely everything. Right now Messi is a Barcelona player and the transfer market is 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.”