After announcing he would be leaving Liverpool when his contract expires this summer, Alexander-Arnold was barracked and booed as a second-half substitute by home fans during Sunday's 2-2 draw with Arsenal.
"I think somehow the fans were being harsh with him," Salah told Sky Sports.
"I think he didn't deserve it at the time, he deserved the fans to treat him the best way possible because he gave it all to the fans.
"We shouldn't act this way with anyone who always appreciates the people, who came here even for six months.
"Imagine someone who gives you his all for 20 years. It's shouldn't be like this. I hope that will change next game, against Brighton or in the last game of the season, because he deserves the farewell."
Trent deserves a great farewell
Salah insists Alexander-Arnold will leave Anfield with the best wishes of the dressing room.
"I really love him," he added.
"I think he deserves the best farewell leaving the club. He has done a lot for the city and done a lot for the club and he's one of probably the best players in the club's history. He gave it all."
Salah also admitted he didn't seek to convince Alexander-Arnold to stay, with the Egyptian signing a new deal weeks before his teammate's announcement.
"I think he needed a new challenge," Salah said. "He spoke to me about it. It's his decision for sure. He's won it all twice or three times - what more can he have done?
"It's his decision - I did not try to convince him to stay because I know 20 years in a club is not easy, it's so tough."