The 29-year-old, capped 77 times by Wales, will become the first active international to play in the match since Australian Dan Vickerman in 2009.
Roberts is currently studying part-time at Cambridge's Queens' College for a Masters degree in medical science.
He will join new club Harlequins after the Varsity at Twickenham.
"It is going to be a unique experience for me and something that will be different to any other game I've played at Twickenham - it's a different group of players, a different standard and different prize. But it is still a very, very important rugby match," said Roberts.
"It won't be like playing for Wales against England in the World Cup, the Barbarians against New Zealand or in an Anglo-Welsh Cup Final for Cardiff Blues as I've done in the past. But I can't wait."
Former Munster and Ireland A lock Ian Nagle will also play for Cambridge as they look to end a run of five successive Oxford victories.
For the latest rugby union news follow @bbcrugbyunion on Twitter.
Wales and British & Irish Lions centre Jamie Roberts will play for Cambridge University in the Varsity match against Oxford on 10 December.