Willstrop had not beaten his domestic rival since the 2007 English Open final but won 11-6 7-11 5-11 11-7 11-4 at New York's Grand Central Station.
"It's been tough over the years," said Willstrop. "His game makes it very hard for me."
Matthew said: "He's a class player and we've played some massive matches, so that win was coming some day."
Willstrop, 33, and 36-year-old Matthew have met 35 times down the years, with Matthew now holding a 26-9 overall record.
Willstrop now faces Paul Coll of New Zealand in the quarter-finals of the JP Morgan Tournament of Champions.
British number two James Willstrop ended a run of 10 years and 19 defeats by beating number one Nick Matthew.