Hartley finished with 10 points and 13 points for the Runnin' Bulldogs (11-10, 3-4 Big South Conference), who snapped a two-game losing streak. Donta Harper scored 10 points and had six rebounds.
Gardner-Webb led by as many as 12 points in the first half, but the Runnin' Bulldogs saw their lead vanish in the second half. The Keydets tied the game at 34-all on Rodney Glasgow's layup with 18:26 left to play.
But VMI (9-10, 4-3) was unable to pull ahead, as Gardner-Webb answered with a 15-2 run that was capped by Jarvis Davis' two free throws with 9:01 remaining.
Mike Krzyzewski says he has good reason to be excited for next season thanks to a combination of Duke's incoming freshmen and a core of experienced upperclassmen.
Georgia guard Juwan Parker has been awarded a medical redshirt, leaving him with two years of eligibility, after missing the 2015-16 season with a partially torn Achilles tendon.
Forward Trevon Bluiett has withdrawn from consideration from the NBA draft and will return to Xavier for his junior season.