The Argentine had been enjoying the last days of his holiday on the Med island before reporting back to preseason training.
He and his wife Antonela Roccuzzo were also joined by Luis Suarez and Jordi Alba and their partners.
Former teammate Cesc Fabregas, now at Monaco, could also be seen partying along with his partner Daniella Semaan who is good pals with Antonela.
After a day enjoying the sun the mood turned nasty in an Ibiza club where a scuffle broke out between Messi and another reveller.
“Different day, different year, same amazing people”
The group were listening to Puerto Rican singer Ozuna when allegedly a man tried to attack Messi.
There was suddenly a series of pushing and shoving before the Barca player was surrounded by security and helped away.
Video footage showed rowing and Messi protected by burly staff wearing white.
Earlier in the day Daniella Semaan posted a snap on Instagram of the players with their partners at an open air bar.
She captioned it: “Different day, different year, same amazing people.”
Later Suarez uploaded snaps of him with Messi and Fabregas.
Messi headed to Ibiza after spending a relaxing break in the Caribbean with his wife and family.
It followed a disappointing Copa America tournament for Argentina where they failed to reach the final after being knocked out by Brazil in the semi-finals.
The Barcelona players return to training on July 1 and face Arsenal in their traditional Joan Gamper season curtain raiser trophy on August 4.