Egypt international Salah was filmed on a mobile phone from a section of home supporters as he was taking a corner during Monday night’s Premier League draw.
The video clip contains audible expletives directed at the player, including comments against his Muslim religion.
West Ham have promised to find those responsible and ban them from the London Stadium, and Pellegrini backed the club’s stance.
“Of course I think that cannot happen in the stadium,” said Pellegrini. “The best way to manage those things out of the game is to remove them from the great spectacle that is the Premier League.
“We must have high standards and when this happens, you must take action. The club knows how to work and says it cannot accept these kind of things in the game.
“It was a very good game and everybody was enjoying the game, so these people must be punished as soon as we can.”