General manager Reggie McKenzie traded the third overall pick to Miami for the pick to draft Hayden and the 42nd overall pick. That deal gives Oakland a second-rounder after trading its own previously in the deal for Carson Palmer.
It is a remarkable comeback for Hayden, who was moments from death last November after an on-field collision with a teammate tore a blood vessel off the back of his heart. He was taken to a hospital and underwent lifesaving surgery.
But he recovered from the scare and ran a 4.4 40-yard dash at Houston's pro day in March and became a first-round pick.
Hayden was Oakland's first first-round pick since taking linebacker Rolando McClain eighth overall in 2010. The Raiders traded first rounders the past two years in deals for Richard Seymour and Palmer.
McKenzie made his first premium pick since taking over the Raiders from late owner Al Davis last year and targeted a porous defense. McKenzie did not pick until 95th overall last year in his first draft with Oakland.
Oakland went 4-12 in its first season under McKenzie and coach Dennis Allen after back-to-back 8-8 seasons the previous two years. Only three starters are returning from a defense that allowed the fifth most points in the NFL last season.
The Raiders signed veteran cornerbacks Tracy Porter and Mike Jenkins to one-year deals this offseason but were still looking for a long-term solution at cornerback.
Hayden played 22 games at Houston, intercepting six passes that he returned for three touchdowns. He also recovered three fumbles and forced six before his senior season was cut short by the injury.
The Raiders have struggled to find impact players in the draft in recent years, especially in the top of the first round. Running back Darren McFadden (2008) and kicker Sebastian Janikowski (2000) are the only of Oakland's own first-rounders still on the roster.
McKenzie cut three former top 10 picks this offseason in defensive back Michael Huff (2006), receiver Darrius Heyward-Bey (2009) and McClain.
Take ABC13 with you!
Download our free apps for iPhone, iPad, Android and Blackberry devices