The Detroit Lions have agreed to terms on a one-year deal worth up to $5.25 million with former Oakland Raiders cornerback D.J. Hayden, sources told ESPN's Adam Caplan.

Hayden, 26, may never live up to his standing as a first-round draft pick (12th overall in 2013 out of Houston). The Raiders were ready to select him at No. 3, despite his nearly dying of a heart injury a few months prior after a nasty practice collision, had they not been able to trade back.

He started to carve out a role for himself in the slot as Oakland's nickel corner in 2016 and the Raiders still trusted him enough that he started on the outside twice before a hamstring injury ended his season after 11 games.

Hayden, who had a base salary of $1,812,777 in 2016, did not have an interception for the first time in his career. In fact, he only has three career picks, for no yards. Three cornerbacks selected after Hayden in that 2013 draft -- Desmond Trufant, Xavier Rhodes and Tyrann Mathieu -- have already been selected to the Pro Bowl. Hayden was also one of the more penalized players in Oakland.

His overall Pro Football Focus grade of 48.6 last season was just 97th among cornerbacks. The QB rating against him was 85.5 (75th among cornerbacks) after he allowed 36 catches for 341 yards and two touchdowns with four passes defensed on 61 targets in 296 snaps in coverage.

ESPN's Paul Gutierrez contributed to this report.