The Bayern Munich boss has been a long-term target for City, but he opted for a year's sabbatical from coaching, as reported by the Daily Mail.
Pellegrini signed a contract extension only last summer but confirmed he and the club both had a get out clause to part company on the original date.
'I wasn't fooled'
"I wasn’t fooled in the summer when Pellegrini signed his contract extension at the club," Shearer wrote on Coral.
"I would not be surprised if he (Pellegrini) knew then that it would be his last season.
"It was probably designed to keep the press at bay, stabilise the players and keep them focused on the campaign ahead.
"Pellegrini has been very professional and dignified with the way he has handled the news. You have to remember Manchester City are still alive in all four competitions this season.
"He’ll get his pay-off and that will be a hefty sum of money.
"You could have a situation similar to when Guardiola took over at Bayern Munich after Jupp Heynckes won the treble. That is a possibility with City this season."
Shearer's City timeline
Shearer has been particularly outspoken about City this season.
Last month the former Newcastle United and Blackburn Rovers striker said he had serious doubts over City's mentality to cope in a title race.
He then claimed Yaya Toure could be the club's downfall in the fight for the title a week later.
But Shearer went on to make a massive U-turn after City's 4-0 drubbing of Crystal Palace two weeks ago when he said they were perfectly poised to win the league.