Harvin, 27, had played for three teams since the start of the 2014 season and has seen his production dip since posting career highs in catches (87) and receiving yards (967) for the Minnesota Vikings in 2011.
Harvin, who was traded from the Seattle Seahawks to the New York Jets during the 2014 season, rejoined two of his former Jets coaches -- Rex Ryan and wide receivers coach Sanjay Lal -- with the Bills last year.
In Buffalo, Harvin showed brief flashes of the playmaking ability that made him a star early in his career. He caught a 51-yard touchdown in the regular-season opener and had 19 receptions for 218 yards before hip and knee injuries sidelined him in October. The Bills later placed Harvin on injured reserve.
Ryan said in December that despite Harvin's ongoing hip problems -- he missed most of the 2013 season because of a similar injury -- the receiver intended on continuing his playing career. Harvin signed a three-year deal last March in which the final two years automatically voided five days after Super Bowl 50 in order to reduce Harvin's 2015 salary-cap number. The contract paid Harvin almost $6 million in guaranteed money.
Harvin, who was selected with the 22nd overall pick of the 2009 draft out of Florida, has 351 career receptions for 4,020 yards and 22 touchdowns in his eight seasons.
ESPN Bills reporter Mike Rodak contributed to this report.
Why Harvin decided to retire
ESPN Bills reporter Mike Rodak believes Percy Harvin could come back to the NFL if his body will allow him.