The 6-foot-4 Lamb played 53 games for Orlando last season, averaging 3.6 points in 13 minutes.
Terms of Lamb's contract were not released Monday when the signing was announced by the Mavericks.
Part of Kentucky's 2012 NCAA championship team as a sophomore, Lamb was an early entry into the NBA draft and Milwaukee took him in the second round.
Lamb played 23 games as a rookie for the Bucks before being dealt to the Magic in a six-player trade in February 2013. That deal sent J.J. Redick from Orlando to the Bucks for the rest of that season.