Ibrahimovic played under Mourinho at Inter Milan and says the Portuguese was an inspirational coach due to his man-management style and tactical nous.
"Mourinho would become a guy I was basically willing to die for," he wrote in his autobiography I am Zlatan Ibrahimovic, excerpts of which have been reported in the Daily Mail.
"He works twice as hard as all the rest. Lives and breathes football 24/7. I've never met a manager with that kind of knowledge about the opposing sides. It was everything, right down to the third-choice goalkeeper's shoe size.
"It was a while before I met him. He's elegant, he's confident, but I was surprised. He looked small next to the players but I sensed it immediately: there was this vibe around him.
"Mourinho created personal ties with the players with his text messages and his knowledge of our situations with wives and children, and he didn't shout. He built us up before matches. It was like theatre, a psychological game."
Ibrahimovic went on to make a big-money move to Barcelona in 2009 but spent just a year at Camp Nou and he blames Guardiola for his troubles.
Recalling one incident when he lost his temper after Barca lost to Mourinho's Inter in the UEFA Champions League semi-finals and he had angrily shouted at his manager, Ibrahimovic said: "I completely lost it, and you might have expected Guardiola to say a few words in response, but he's a spineless coward."
Ibrahimovic admits he was surprised by the way players were expected to behave at Barcelona and does not believe he fitted in under Guardiola.
The Swede, who now plays for Paris St Germain, explained: "I'd already got the impression that Barcelona was a little like being back at Ajax, it was like being back at school.
"None of the lads acted like superstars, which was strange. Messi, Xavi, Iniesta, the whole gang - they were like schoolboys. The best footballers in the world stood there with their heads bowed, and I didn't understand any of it. It was ridiculous.
"Everyone did as they were told. I didn't fit in, not at all. I thought, just enjoy the opportunity, don't confirm their prejudices. So I started to adapt and blend in. I became way too nice. It was mental.
"I said what I thought people wanted me to say. It was completely messed up. I drove the club's Audi and stood there and nodded my head. I hardly even yelled at my team-mates any more. I was boring. Zlatan was no longer Zlatan."
Ibrahimovic was also disappointed that Guardiola changed Barcelona's game to suit Lionel Messi and felt that he was being unfairly marginalised.
He said: "Guardiola sacrificed me. That's the truth. One of my mates told me: 'Zlatan, it's as if Barca had bought a Ferrari and was driving it like a Fiat,' and I thought: 'Yeah, that's a good way of looking at it.' Guardiola had turned me into a simpler player and a worse player. It was a loss for the whole team.
"He wouldn't even say good morning. Not a single word. He avoided eye contact with me. If I went into a room, he would leave. 'What's going on,' I thought. 'Is it something I did? Do I look wrong? Am I talking funny?' All these things were buzzing around in my head. I couldn't sleep.
"I was thinking about it constantly. Not because I needed Guardiola's love, exactly. He could hate me, as far as I was concerned. Hatred and revenge get me going. Now, though, I lost my focus.
"Because of Guardiola's problem, the club were forced to do a disastrous deal to sell me - it was crazy. I'd scored 22 goals and 15 assists during my season at Barcelona. Yet I'd lost nearly 70 per cent of my value. Whose fault was that? Guardiola, the quiet little over-thinker, had tried to wreck me."