The 27-year-old joined Liverpool from German side Mainz 05 in the summer of 2016 but he failed to impress when given the chance in goal and was shipped out on a two-year loan deal to Besiktas in Turkey in the summer of 2018.
Karius terminated his contract with Besiktas following a row with the club’s hierarchy over unpaid wages in May and returned to Liverpool.
Karius reserved arguably his worst performance in a Liverpool shirt for the 2018 UEFA Champions League final in Kiev when he was at fault for two of Real Madrid’s three goals.
“I’m looking forward to my new opportunity in Berlin and I’m happy to be playing in the Bundesliga again,” Karius told the club’s website.
“Union is a special club, one that has earned a great deal of respect, not just by promotion to the Bundesliga.
“I would like to play my part in this positive development and help to achieve the great goal of staying in the Bundesliga.”
Oliver Ruhnert, Director of Professional Football at Union Berlin, added: "The signing of Loris Karius means we have secured a goalkeeper with great national and international experience.
"His strengths are well known, so we are pleased to be in an excellent position in this important role of the team from our perspective.
"For Loris it offers the chance to focus again on the Bundesliga in a stable environment and to try to stay in the league with Union."