Nadal outlasted Medvedev 7-5, 6-3, 5-7, 4-6, 6-4 in four hours and 49 minutes in front of an electric Arthur Ashe Stadium on Sunday, surviving a stunning comeback by the Russian, ATP Tour reported.
With the victory, the Spaniard claimed his fourth US Open title.
Nadal made his opponent work for every point and overcame the aggressive Russian in one of the most gripping five-set finals in the Grand Slam history.
Medvedev, 23, rallied from two sets and a break down to force a decider. But, showing his trademark fight, experience and unrelenting resolve, the 33-year-old Nadal fought off his challenger to cross the finish line in a thrilling fashion.
With his 19th Grand Slam victory, Nadal closes the gap to just one on Swiss legend Roger Federer in the all-time title chase.
He has also moved to three ahead of Novak Djokovic for solo second place on the list.
Nadal has continued his impressive run of form, extending his winning streak to 10 straight matches, and improving to 26-1 in his past five tournaments.