The match will take place on Saturday August 2, with a 3pm kick-off, and follows last year's high-profile visit of Chelsea.
Rangers chief executive Martin Bain said: "We are pleased to confirm Liverpool will be heading to Ibrox as part of our pre-season programme in early August.
"Like Rangers, they are a club with a rich history and tradition and I know our fans will enjoy watching players of the calibre of Steven Gerrard and Fernando Torres."
Bain added: "We enjoyed a terrific game with Chelsea last pre-season and Liverpool will provide another great test for Walter and his players as they prepare for the new campaign."