Elko, 44, spent the past four seasons with Texas A&M after coordinator stints at Notre Dame, Wake Forest, Bowling Green and Hofstra. He had been a candidate for several Power 5 head-coaching opportunities in recent years.
Duke also considered Clemson offensive coordinator Tony Elliott, who earlier Friday accepted the head-coaching job at Virginia. Other candidates included former Dallas Cowboys coach Jason Garrett, Michigan offensive coordinator Josh Gattis, Army coach Jeff Monken and Dallas Cowboys assistant George Edwards, sources said.
Elko replaces David Cutcliffe, who reached a mutual separation agreement with Duke on Nov. 28 after 14 years as coach. Cutcliffe guided Duke to 77 wins, six bowl appearances and the 2013 ACC Coastal Division championship.
Duke lost eight games in a row to finish 3-9 this season, failing to win an ACC game for the first time since 2007. It was the Blue Devils' third straight losing season.
Elko played safety at Penn and came up in coaching under Wake Forest coach Dave Clawson, working for him at four schools.