The deal was first reported by ESPN.com's John Clayton.
The second of Buffalo's two 2006 first-round draft picks, McCargo had difficulty gaining a regular role in the team's defensive line rotation and had dropped to fourth on the Bills' depth chart behind Spencer Johnson.
His agent said he may have an easier time fitting in with the Colts.
"We'd been talking to the Bills about finding a new home for John, and he couldn't be in a better place than Indianapolis with the style they run," Hadley Engelhard said in a phone interview.
Engelhard was unsure about the details of the draft pick Buffalo acquired, but it is believed to be a middle-to-late round pick based on McCargo's contributions with the Colts.
Buffalo (4-1) is coming off its bye week and had expressed interest in acquiring Chiefs tight end Tony Gonzalez, who remained with Kansas City.
The move did not come as a surprise as McCargo appeared in only four games this season, and after he was left inactive for Buffalo's season opener against Seattle. He was credited with only two tackles this season.
McFarland was a key contributor in the Super Bowl run before sustaining a season-ending knee injury in training camp in 2007.
The Colts (3-2), coming off a 31-3 win over Baltimore, have struggled against the run this season, though they did limit the Ravens to 51 yards rushing. The Colts have lacked depth at defensive tackle after Quinn Pitcock unexpectedly retired in July after one NFL season, and Ed Johnson, considered the team's best run-stuffer, was waived last month after he was stopped for speeding and subsequently charged with marijuana possession.
McCargo could be just what the Colts need.
"I think he's thrilled," Engelhard said. "He's going to one of the elite franchises in the league, if not the elite franchise in the league."
The 6-foot-2, 307 pounder from North Carolina State is relatively undersized by NFL standards. McCargo was considered to be fast on his feet, but lacked consistency in Buffalo, and was never able to usurp the starting job from Kyle Williams, whom the Bills selected in the fifth round of the 2006 draft.
In 25 career games, none as a starter, McCargo had only 2½ sacks and one forced fumble. The Bills had high hopes for McCargo after they swung a draft-day trade with Chicago to get back into the first round to select him 26th overall.
McCargo, however, missed the final 11 games of his rookie season with a broken left foot, the same one he broke in his final year at college and was still recovering from that injury last season.
"They had to rebreak it late last spring , so he was still coming back from that," Engelhard said. "So he's really just a second-year player."
His stock continued to fall this past offseason when the Bills revamped their defensive line by acquiring Johnson in free agency and landing three-time Pro Bowl selection Marcus Stroud in a trade with Jacksonville.
McCargo enjoyed a solid college career, but was overshadowed while playing on a line anchored by Mario Williams, who was selected No. 1 overall in the 2006 draft by Houston.
The Colts released defensive tackle LaJuan Ramsey to make room for McCargo on the roster.
Information from The Associated Press was used in this report.