Jeff Gordon was second, giving Hendrick Motorsports a 1-2 finish on the 10-year anniversary weekend of the fatal plane crash that killed owner Rick Hendrick's son and nine others aboard.
Gordon was the highest finishing Chase driver. Without a Chase driver in Victory Lane, no driver clinched an automatic berth in the championship finale at Homestead.
Chase driver Ryan Newman was third, and Tony Stewart finished fourth. Chase drivers Joey Logano and Matt Kenseth were fifth and sixth.
Stewart gambled and stayed on the track after the race was red-flagged with 10 laps left. Earnhardt and Gordon pitted, and that one final stop was just enough for the milestone finish. Earnhardt got his fourth win of the season.
Earnhardt Wins At Martinsville
Dale Earnhardt Jr. passed Tony Stewart in the final laps to win the NASCAR Sprint Cup Series race at Martinsville.