Former ski jumper Roglic, the Tokyo Olympics time-trial gold medallist, is leaving Jumbo-Visma where he is under contract until 2024 having joined in 2016 when the team was called Lotto-Visma.
"I am looking forward to this step, even though a team change is kind of like new territory for me," the 33-year-old said in a statement.
"The good memories of when we met years ago made the talks easy. But the decisive factor was that the team is really motivated to work with me, and that we hold the same ideas."
In Jumbo's yellow and black jersey, Roglic won the Liege-Bastogne-Liege in 2020, three Vuelta a Espana titles in 2019, 2020 and 2021, and the Giro d'Italia this year.
He was also runner-up in the 2020 Tour de France having worn the leader's yellow jersey for 11 days.
Bora manager Ralph Denk welcomed the Slovenian's arrival ahead of this weekend's Tour of Lombardy, the final Monument race of the season.
"Eight years ago, Primoz almost joined us as a neo-pro. Now he comes to us as a pro with a long list of victories that very few others have achieved."
Roglic has 80 victories, including four Grand Tours, but also the Paris-Nice, the Dauphine and Liege-Bastogne-Liege.
Jumbo has a star-packed lineup.
Roglic shared the leadership with Jonas Vingegaard and won the year's first grand tour, the Giro d'Italia. The Dane then showed he was gaining the upper hand by winning his second straight Tour de France. Jumbo completed a sweep of the major tours when Sepp Kuss, winning his first major tour, took the Vuelta a Espana with Vingegaard second and Roglic third.
By joining the Bora team, Roglic should have more freedom to aim for a victory next July in the Tour de France, where he took second place in 2020 after being overthrown by fellow Slovenian Tadej Pogacar in the final time-trial.
The German team includes top riders such as Australian Jai Hindley and Russian Alexander Vlasov as well as the Belgian prodigy Cian Uijtdebroeks.
Denk added: "Together we want to leave our mark on the big races. Primoz appreciates the strength of our squad and knows the great potential of his future teammates."