The Dubliner endured a tough 2004/05 campaign with NEC Harlequins, making just six league appearances - four off the replacements bench - for the relegated Londoners, due to the broken bone in his foot he received against Munster in January.
The 25-year-old's move to Bath could offer him a new lease of life, and he intends on challenging the first-choice Chris Malone for the number 10 shirt.
"My ambition is to breakthrough into the first team," he told the club's website. "I realise that Chris Malone has been playing well for the last two seasons at fly half so competition for a starting place will be fierce.
Dunne, who joined 'Quins from Leinster in the summer of 2003, feels Bath can get back to their glory days of their 1997 and 1998 Heineken Cup successes.
"Bath experienced unrivalled success during the 1980s and 1990s, and although it will be difficult to emulate such success as the Premiership is now much more competitive, I feel that I am joining a squad which has the ability to consistently challenge for honours and that is something that excites me," added Dunne, whose representative honours include appearances for Ireland Schools, Under-19s and Sevens.
Bath's Director of rugby Jack Rowell commented: "Andy is an extremely useful footballer who is able to run a game well and is also a quality place kicker."