Zimbabwe-born Denton, who qualifies to play for Scotland through his mother, has spent two seasons at The Rec, after signing from Edinburgh in 2015.
He becomes Warriors' sixth signing in preparation for the 2017-18 campaign.
As well as Northampton pair prop Ethan Waller and Sam Olver, Wasps winger Tom Howe signed in January, while Jersey forwards Pierce Phillips and Simon Kerrod agreed terms in February.
South Africa-educated Denton, who can play in the back row or at lock. has won 35 caps for Scotland.
He played four times in their 2015 Rugby World Cup run, including their luckless quarter-final defeat by Australia.
Prior to his move to Bath, he also made 79 appearances for Edinburgh, helping them to reach the European Challenge Cup final in 2015.
Warriors director of rugby Gary Gold said: "David is a powerful athlete who will add more firepower to our back row. He is a strong ball-carrier with international experience."
Worcester have signed Bath and Scotland international forward David Denton.