Virginia improved to 20-8 and 10-5 in the Atlantic Coast Conference. Duke is 24-4 and 11-4 in the ACC.
It was the first win over a top-five team for Virginia since it beat Duke 11 years ago to the day.
Joe Harris scored 36 points and Akil Mitchell added 19 points and 12 rebounds for the Cavaliers at John Paul Jones Arena in Charlottesville, Virginia.
Seth Curry led the Blue Devils with 28 points and Quinn Cook contributed 22 points.
To contact the reporter on this story: Nancy Kercheval in Washington at firstname.lastname@example.org
To contact the editor responsible for this story: Michael Sillup at email@example.com