North Yorkshire Fire crews were called to the River Foss in the city centre after the man entered the water near Carmelite Street in the early hours of Thursday morning.
Fortunately, tragedy was avoided and the young man's life was saved thanks to the heroic efforts of a friend and a police officer who rushed to their aid.
The friend held onto the man after he fell into the river, before the officer took over as they waited for further emergency services to take over.
A spokesman for North Yorkshire Fire and Rescue Service said they were called at 3.43am.
"The male was checked over by paramedics at the scene and was transported to hospital by ambulance as a precaution."
York's rivers, the Ouse and Foss, have claimed many lives in recent years, while many more have required medical treatment after entering the water.
Last month, three people died in the space of a fortnight after their bodies were founds in the waters. The body of a missing man was recovered from the Foss on April 6, while a woman's body was found in the River Ouse on April 12. The body of another man was also recovered from the Ouse two days later.