While at Villarreal, the 59-year-old was approached by former City owner Thaksin Shinawatra in 2007, but the Thai business tycoon eventually appointed Sven-Goran Eriksson.
"I had twice chances to arrive here before," Pellegrini told reporters. "One was to Manchester City, but with the other owners, not these owners.
"Liverpool, I was very near, after Real Madrid, to arrive at Liverpool.
"But for different things, it was not the moment. Now it is the right moment with the right club."
Pellegrini will take charge of City for the first time on Sunday, when his side face Supersport United in the Nelson Mandela Football Invitational.