A section of Hammers fans were filmed racially abusing Salah during the two side’s 1-1 draw at the London Stadium on Monday.
West Ham released a statement after the incident stating that they had opened an investigation into the incident.
“Of course I think that cannot happen in the stadium,” Pellegrini said.
“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.”
West Ham face Crystal Palace on Saturday, with Marko Arnautovic set to return from the foot injury which sidelined the striker soon after his new contract was signed.
Pellegrini also revealed that he doubts whether former Arsenal midfielder Jack Wilshere will return this season, but hope remains that Manu Lanzini could be in line for a return this month.
“Jack will finish his six-to-eight weeks [rest] after his ankle surgery next week,” he added. “He will return to different work and we will see how he is.
“Andriy Yarmolenko, Winston Reid and Carlos Sanchez will not be back this season. Jack Wilshere, I have some doubts if he will be ready.
“We hope that Manu Lanzini will be ready for Fulham, at least for the bench, if he continues working over the next two weeks.”
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies