Ibrahimovic, now at Manchester United, left Barcelona for good in 2011 just as Messi was developing into a world beater.
The Swedish striker has previously revealed his relationship with then-manager Guardiola was strained.
And, speaking after his United side lost 2-1 to Guardiola’s Manchester City on Sunday, Ibrahimovic has revealed exactly what life was like in his brief stint at the Nou Camp.
“I was at Barca for a reason,” the Manchester United striker told Sky Sport Italia.
“I’d scored a lot of goals in my first six months and we won two Super Cups. The first six months were perfect.
“After that, we changed system and tactics, and it wasn’t good for me, so the club told me to talk to Guardiola.
“And I told Guardiola that he’d sacrificed the other players for Messi. He told me he understood me.
“After that, he put me on the bench for the next game, the one after that and the one after that.
“And I thought, ‘he’s solved the problem very well I see!’ After that, he didn’t talk to me or even look at me.
“I’d walk into a room and he’d walk out. I’d go to meet him and he’d go somewhere else. I understood that there was something beyond football.
“But the problem was his, it was he who hadn’t solved the problem with me. I remember on my first day, he told me that the Barcelona players didn’t turn up to training in Ferraris or Porsches.
“He’d already judged me then, but if you don’t know a person then you can’t judge them. I had my experience with him, I don’t know about others.
“But I read the same thing had happened to Mario Mandzukic and Samuel Eto’o. He wasn’t the worst coach I’d worked under, but he was certainly the most immature because a man solves his problems.”
Ibrahimovic was shipped out on loan to AC Milan after just one season at Barcelona.
He was then sold to the San Siro club before making the move to PSG in 2012, where he won four titles in four years.
Now back fit at United following a serious knee injury, Ibrahimovic revealed how Barca signed him from Inter Milan back in 2009.
“Mino (Raiola) called me and we went there, it was all done, the contract was signed and the Press conference was ready.
“There were 70,000 people at the stadium, I felt an adrenaline rush and motivation that I wanted to play right away.”