During an online chat with Liverpool fans, Gary Hyland, 32, from Bootle in Merseyside, joked about the Egyptian striker praying to Mecca at half-time and sent altered images of the whole team praying to Allah.
Hyland - reportedly an Everton fan - then sent a photograph of Salah with a suicide vest superimposed on the top part of the player's body as well as making racist remarks about Salah and sending further images that poked fun at people praying to Allah.
The tweets on 6 August were reported to Merseyside Police and two days later Hyland was arrested at his home.
Hyland later said to officers: "I know I'll get charged. It was me."
Earlier this month he pleaded guilty to racially/religiously aggravated intentional harassment and obstructing an officer in the execution of his duty.
Hyland was today given a six-week jail term, suspended for 12 months, said the Crown Prosecution Service.
Sefton magistrates also ordered him to complete 200 hours of unpaid work in the community and 14 days of a Rehabilitation Activity Requirement, including attending a Promoting Human Dignity Course.
Angela Conlan, from Mersey Cheshire Crown Prosecution Service, said: "He pleaded guilty and admitted what he'd done was stupid. These sorts of remarks fuel racial hatred and are extremely offensive to people from the race or religion that they are aimed at.
"Mohamed Salah does not deserve to be the object of abuse and neither does any person in a civilised society. The tweets were sent in the early hours of the morning and Hyland turned a discussion into a racist rant.
"That is not acceptable. Let this be a lesson to everyone that words can hurt and society has standards that must be upheld."