Pellegrini was sacked just three days after Christmas following a run of nine defeats in 12 games.
First choice gloveman Lukas Fabianski missed 12 Premier League matches with a hip injury and Roberto was drafted into the side in the Poland international's absence.
But his lack of confidence was evident from the start and opposition teams quickly bombarded him with crosses and long distance shots, leading to handing errors which caused West Ham to conceded crucial goals.
Pellegrini was asked what factors led to him losing his job and had little hesitation in pointing the finger at Roberto.
"Unfortunately, we had a major injury, from the goalkeeper [Lukasz Fabianski] of four months. And the performance of the second [Roberto] was not as expected," Pellegrini told Chilean newspaper La Tercera.
"He had responsibility in several goals. The team was losing confidence, the results were denied and the owners decided to change."
Roberto has since been loaned to Spanish side Alaves for the remainder of the campaign, with Moyes bringing goalkeeper Darren Randolph back to the club from Middlesbrough.
Pellegrini added: "In football, the first thing that one must understand is that you always have the responsibility. You can fall into those negative streaks.
"The players lose confidence and you, as a coach, must find the solution. You don't always find it and sometimes the board don't have patience.
"It has happened to Mourinho, Pochettino, Emery … What happens is that it never happened to me."
The 66-year-old added: "It [The sacking] hurt me. It is the first time in 20 years that I did not finish the season. In all clubs the season was over.
"At Real Madrid I did not finish my contract, but the season did. I hadn't stopped in the middle of the season for 20 years".