Purdy, 25, has made more than 40 Guinness Premiership and European Cup appearances for Wasps. He will join Bath at the end of this season.
Bath head coach Steve Meehan said: "Martin is the first of several new players we will be announcing over the next couple of months, and we are delighted that he has decided to join the club."
Purdy made his Wasps debut in early 2003 but struggled to gain regular first XV action due to a series of injuries.
The former England U21 captain missed much of the 2004-5 season with a dislocated shoulder and he broke his arm twice in 2005-6 which limited him to five appearances last season.