The Serbia international returns to the Portuguese club after making 39 appearances and scoring two goals during a loan spell in 2020-21.
Grujic was Jürgen Klopp’s first signing as Reds manager when he agreed a switch to Anfield from Red Star Belgrade in January 2016 before arriving later that year.
He featured in eight games during his debut season with Liverpool and six more in 2017-18, and then joined Cardiff City on loan for the second half of the campaign.
Two productive seasons with Hertha BSC followed as Grujic enjoyed regular game time in the Bundesliga.