Both Paris Saint-Germain and City have been linked with moves for Messi but Guardiola insists the 34-year-old will not be arriving at the Etihad Stadium after the club spent a British record £100 million on Jack Grealish and handed the former Aston Villa captain the No. 10 shirt.
"We spend £40m on Grealish, £100m we pay and £60m we won [from incoming transfers], and he will wear No. 10," Guardiola told a news conference on Friday. "We were incredibly convinced on Grealish and convinced Messi would stay at Barcelona.
"Right now, it's not in our thoughts. Absolutely not. It was a surprise. [Barcelona president Joan] Laporta was clear today about the reasons.
"As a supporter [of Barcelona], I'd love him to have finished at the club. I've just incredible gratitude for the most extraordinary player I've seen in my life."
Despite pouring cold water on the chances of signing Messi, Guardiola has suggested City's summer spending is not over while they continue to chase Harry Kane.
"Harry Kane is an exceptionally talented striker and of course, we're very interested but if Tottenham don't want to sell... Of course, we'll try," Guardiola said. "If Tottenham don't want to negotiate, it is finished.
"If they want to negotiate, many clubs would like to sign him. We are not an exception. We are very interested in him."
Speaking ahead of the Community Shield clash with Leicester City at Wembley on Saturday, Guardiola also raised the possibility that members of his squad will leave before the transfer deadline on Aug. 31.
Bernardo Silva has been linked with a move away but the City manager said he is not the only one who wants to go.
"Not just Bernardo, there are two or three players that want to leave but they are our players," Guardiola said. "When they bring some offer and they want to leave, we are open to discuss but it depends on them."