The 23-year-old former England youth international, who also plays Minor Counties cricket for Devon, will move to The Oval at the end of this season.
Burke's sole first-class appearance for Somerset came in 2012 but he featured in three T20 Blast matches this summer.
"James is a genuine all-rounder of great potential," Surrey director of cricket Alec Stewart said.
Surrey have agreed a deal to sign Somerset all-rounder James Burke on a two-year contract.