Jepkosgei finished the race in first place at 2 hours, 22 minutes, and 38 seconds, missing the course record by seven seconds.
FIND YOUR FINISH: Watch as thousands of runners cross the finish line at the TCS NYC Marathon
The 25-year-old Jepkosgei holds the world record in the half-marathon but had never run this distance. The Kenyan pulled away from countrymate Keitany with about three miles to go. Keitany collapsed after finishing 53 seconds later.
Jepkosgei is the youngest winner in New York since 25-year-old Margaret Okayo in 2001. She also won the New York City Half-Marathon in March and is the first runner to win both events.
Jepkosgei and Keitany were followed by roughly 52,000 racers a year after a world marathon record 52,813 runners crossed the finish line in Central Park after winding through New York's five boroughs.
Geoffrey Kamworor of Kenya has won his second men's title in three years at the New York City Marathon.
Kamworor crossed the finish in Central Park at 2 hours, 8 minutes and 13 seconds Sunday.
He pulled away from countryman Albert Korir in the 24th mile. Korir finished second, and Ethiopian non-elite runner Girma Bekele Gebre was third.
The 26-year-old Kamworor finished third last year after winning in 2017.
Both of last year's wheelchair champions returned to defend their crowns. Manuela Schar of Switzerland has won her third straight women's wheelchair title at the New York City Marathon, giving her eight consecutive marathon major victories.
After rolling ahead of the record pace for much of Sunday's race, Schar crossed the finish about a minute off the mark at 1 hour, 44 minutes and 20 seconds.
Daniel Romanchuk crossing the finish line in 1 hour, 37 minutes and 24 seconds. Last year, at 20 years old, he became the first American and youngest competitor to win the men's division.
Reigning men's champion Lelisa Desisa has dropped out of the New York City Marathon after completing just seven miles, perhaps hurting following a grueling victory at the sweltering world championships last month.
Desisa, who is from Ethiopia, was in 17th place at the seven-mile mark before leaving the course Sunday. It was 45 degrees F (7 degrees C) at the start of the men's race, ideal for marathoning.
Desisa was attempting to defend his title 29 days after winning worlds in Doha, Qatar, in boiling conditions he described this week as "dangerous." With a temperature of 84 degrees F (29 degrees C) for the midnight start, 18 of 73 men didn't finish that race.
Conditions were even worse for the women's marathon in Doha, where 28 of 68 starters failed to finish.
Shortly after, the IOC announced plans to move next year's Olympic marathon from steamy Tokyo to the cooler northern city of Sapporo, leading to a spat with Tokyo Governor Yuriko Koike. She conceded to the IOC on Friday.
WINNERS THANK NYPD
The four champions met up once again Monday morning to thank the NYPD officers who lined the course, presenting them with an official finish line tape.
Former New York Giants running back Tiki Barber is set to run his sixth straight NYC Marathon. "Orange Is the New Black" actor Uzo Aduba will run for the second time, and Luke Kirby from "The Marvelous Mrs. Maisel" will run for the first time.
MORE MARATHON STORIES
Watch the 2019 TCS NYC Marathon Opening Ceremony
Chefs team up to run the TCS NYC Marathon
TCS NYC Marathon marks milestone for Amy Robach
New Jersey police officer honors boy stricken by brain cancer with marathon run
Complete coverage of the TCS NYC Marathon can be found here!
The Associated Press contributed to this story.
* More TCS NYC Marathon coverage
* Follow us on YouTube
* More local news
* Send us a news tip
* Download the abc7NY app for breaking news alerts