The 25-year-old Egyptian made just six league starts during his time playing for Chelsea from February 2014 to February 2015, before moving on loan to Fiorentina and then Roma.
Roma signed Salah permanently and last season he was one of Serie A's top players, scoring 15 goals and setting up 11 others.
"I'm very excited to be here. I'm very happy. I was in Egypt and I came two days ago," Salah told Liverpool's website.
"I will give 100 percent and give everything for the club. I am happy to be here and I really want to win something for this club."
Liverpool finished fourth in the Premier League last season.
The Egyptian has signed a five-year contract and had been a prime target for manager Jurgen Klopp.
"He has the perfect mix of experience and potential – this is a really exciting signing for us," he said.
Salah will wear the number 11 shirt, the same number he wore for Roma and the Egyptian national team, with Roberto Firmino moving to number nine.
He has made 52 appearances for Egypt, scoring 29 goals.
"I feel the love from the fans in Liverpool here and I'm happy about that," Salah said.
The Egyptian will join a host of high-profile Muslim footballers currently playing in the premier league, including Manchester United's Paul Pogba, the most expensive player in the world.
Fellow Egyptian Mohamed Elneny plays for Arsenal, together with Mesut Ozil, Shkodran Mustafi, and Granit Xhaka, while other high-profile Muslim players include Sadio Mane (Liverpool), Riyad Mahrez (Leicester City), Emre Can (Liverpool), and Yaya Toure (Manchester City), among many others.