The 24-year-old Hughes, who was drafted by Indianapolis 31st overall in the 2010 draft, posted career-bests in sacks (four) and tackles (41) last season, appearing in all 16 games with six starts.
"We wish nothing but the best for Jerry in Buffalo," Colts general manager Ryan Grigson said in a statement. "He's a talented guy that did everything we asked of him. At the same time, we are very pleased to be getting a young linebacker who has been a productive starter in this league."
Sheppard, 25, also posted career-highs in tackles (80) and sacks (two). He played in all 16 games for Buffalo, starting 15. He was drafted in the third round of the 2011 draft.
Used initially as a defensive end, Hughes made the switch to linebacker with the Colts last season.
At 6-foot-2 and 254 pounds, Hughes' versatility could be a better fit on a Buffalo defense that's in transition under new coach Doug Marrone and new coordinator Mike Pettine.
The Bills also added a linebacker in the draft, selecting Oregon's Kiko Alonso with the 46th pick. Alonso is a hard-hitting player who spent most of his three-year college career playing in the middle.
Hughes became expendable in Indianapolis after the draft, too. The Colts used their first-round pick, 24th overall, to draft defensive end/linebacker Bjoern Werner from Florida State.
Sheppard was strictly a middle linebacker, who was part of a unit that struggled against the run in each of the past two seasons.
Information from The Associated Press was used in this report.