The 29-year-old’s existing contract is due to expire at the end of the 2017-18 campaign and no agreement over a renewal has yet been reached.
Xavi is confident Messi will sign a renewal, but has warned Barca not to keep their star man waiting much longer.
“I am convinced Messi will sign a new deal. Barcelona need Messi, but Messi also needs Barcelona,” Xavi told TV3.
“He looks happy to me, more mature and calm than ever before.
“I cannot see him changing clubs, but we have to act swiftly.
“It would be a historical mistake for Barcelona not to renew Messi’s contract.
“Leo is the best player in history. His importance will become even more clear once he retires.”