Serbia international Grujic enjoyed a productive loan spell with Cardiff City last term and will now spend the 2018-19 campaign in the Bundesliga, having first committed his long-term future to the Reds.
The 22-year-old has made 14 senior appearances for Liverpool since arriving from Red Star Belgrade in 2016.
He helped Cardiff win promotion to the Premier League last season and was part of his country’s squad at this summer’s World Cup.