The pair were playing at the China Open qualifiers in Barnsley, with Wilson beating Hamilton 5-3 for a place at the Beijing finals in March.
The 24-year-old scored four centuries, while Hamilton, 44, scored two tons to break the previous record of five.
Only two matches had previously recorded five consecutive centuries.
How the record-breaking run unfolded:
Reigning Masters champion Ronnie O'Sullivan and seven-time world champion Stephen Hendry were the first opponents to do so at the 2003 British Open.
They were followed by Stephen Maguire and Neil Robertson at the 2009 Masters.
"It's the best match I've ever played by far," said Wilson. "Even if I had lost I still would have enjoyed it.
"Anthony was very gracious afterwards, he wished me luck and we agreed that it had just been a phenomenal match."
It was a quick turnaround for Wilson, who five days ago was knocked out of the German Masters when he lost 6-3 in the semi-finals to Belgium's Luca Brecel.
The China Open, which began in September 1997, is the longest running of the China ranking events and was the first international snooker tournament in the country.
The 2016 tournament begins in Beijing on 28 March.
England's Kyren Wilson and Anthony Hamilton have made history by scoring six consecutive centuries in a snooker match.