After high school, Dunbar opted to attend the University of North Texas, as it was close to his home.[2] He played in his first college football game on September 6, 2008, against Tulsa. He had 10 rushing attempts for 72 yards and a touchdown, and he also had three receptions for 25 yards.[3] He played in five games that season, finishing with 178 rushing yards on 39 attempts, for a 4.6 average.[4]

In 2009, Dunbar played in all 12 of North Texas' games. He did not have more than 16 rushing attempts during the first four games. On October 10, against Louisiana-Lafayette, he had 32 carries and set career-highs with 187 rushing yards and four touchdowns.[5] Against Florida Atlantic one week later, he ran for 238 yards, his highest total of the season, and had three touchdowns.[6] Dunbar had 1,378 rushing yards and a conference-leading 17 rushing touchdowns in 2009 and was the team's leading rusher.[7][8]North Texas had a record of 2-10.[6]

Dunbar was named to the preseason All-Sun Belt team in 2010.[9] He did not rush for over 141 yards in any of the first seven games that year. However, in the last five games, he rushed for over 200 yards three times.[10] During the final game of the season, against Kansas State University, he set a career-high for rushing yards, with 270. He had 22 carries and averaged 12.3 yards per attempt that day. In addition, he scored three rushing touchdowns and one receiving touchdown.[11]North Texas lost that game and had a 3-9 record in 2010.[10] He finished his junior year with 1,553 rushing yards and 13 rushing touchdowns.[12] He led North Texas in rushing yards for the second-straight season and also ranked sixth in the entire country.[13][14] In his final season in 2011, he had 1,115 rushing yards and 10 rushing touchdowns to go along with 29 receptions for 350 receiving yards and two touchdowns.[15]

Dunbar began the 2013 season with the expectation of being a change-of-pace back that could play backup to DeMarco Murray, but injuries (three games missed) and fumble issues impacted his playing time at the start of the season. He was fighting for the third-string running back position with rookie Joseph Randle, when he had a breakout game against the Oakland Raiders, registering 82 rushing yards (6.8 average), but also suffering a season-ending knee injury.[21] For the year, he recorded 150 yards, averaging five yards per attempt, leaving the Cowboys with high hopes about his running ability.[22] In 2014, he did not see much playing time behind Offensive Player of the Year DeMarco Murray and also fell to third-string behind Joseph Randle.[23]

On March 17, 2016, Dunbar re-signed with the Cowboys on a one-year, $1.75 million contract.[28] He began training camp on the physically unable to perform list, while recovering from his previous knee injury. He made a surprising recovery that had him available to play in the last preseason game and that made the Cowboys decide to keep Darren McFadden on the Non Football Injury List.[29] His injury knee flared up and was declared inactive against the Chicago Bears, Green Bay Packers, and Philadelphia Eagles. With the emergence of rookie Ezekiel Elliott, the offseason addition of Alfred Morris, and the late season return of McFadden, his impact and production were limited, finishing with 31 rushing yards, 122 receiving yards, and one rushing touchdown.[30]

On March 16, 2017, Dunbar signed a one-year contract with the Los Angeles Rams, who were looking to replace Benny Cunningham.[31] He also reunited with running back coach Skip Peete, who coached him in his first season with the Cowboys. He was placed on the physically unable to perform list to start the 2017 season after dealing with a knee injury.[32] He was activated off PUP to the active roster on November 11, 2017.[33] He finished the season with 11 carries for 51 rushing yards and a touchdown in four games.[34] On March 9, 2018, Dunbar was released by the Rams.[35]