The Wales center has been with Quins since 2015 after ending his two-year stint with French club Racing 92 and has made close to 50 appearances for the west London outfit.
The Newport-born ace has also won 94 caps for Wales and been part of two British & Irish Lions tours, making three Test appearances.
Roberts' deal with his current club expires in the summer and he will join his new team-mates for pre-season, with hopes high that he will be able to win silverware while at the Recreation Ground.
"I'm really excited to have signed for Bath - it's a club with a great deal of ambition, which was crucial in making my decision to come here," he said.
"There is no doubt that Bath can mix it with the best in both the Premiership and in Europe over the next few years and I'm looking forward to being part of the journey."