Jepkosgei, who won the 2019 New York Marathon, made the decisive move at 22 miles and went on to win by 15 seconds.
The 27-year-old crossed the line in two hours 17 minutes and 43 seconds, while a tired Kosgei dropped back to fourth.
Ethiopia’s Sisay Lemma landed the biggest win of his career in the men’s race, coming home in 2:04.01.
Marcel Hug and Manuela Schar completed a Swiss double in the wheelchair races, with Britain’s David Weir coming third in his 22nd London Marathon.
Fine, dry and cool conditions contributed to impressive times with Lemma becoming the sixth fastest man ever in the race, Jepkosgei leaping to seventh on the women’s all-time list and course records in both wheelchair races.
After 2020’s elite-only races, this year’s London Marathon welcomed back just over 36,000 mass-event runners to the traditional street course, while another 40,000 runners set out to complete a marathon virtually, logging their distance via a tracking app.
“I’m very excited. Such a beautiful day for running,” Jepkosgei told BBC Sport.
“I’m so happy for the London crowd. Every kilometre there were people cheering all the way.”
The race included several measures to reduce its carbon impact, including electric lead vehicles and finish line goodie bags made out of sugar cane, rather than plastic.
‘This is my Olympics’ – Purdue
Charlotte Purdue, who controversially missed out on Tokyo 2020 selection, was the first Briton home in the women’s race.
Purdue finished 10th in a personal best 2:23.26, just short of Mara Yamauchi’s second place on the British all-time list, but well inside the qualifying standard for next year’s World Championships in Oregon.
“Do I feel vindicated? Yes, definitely,” said Purdue. “The London Marathon is such a special event. It is not like a ‘B’ race. This is my Olympics. It is as special to me to run like this in London.”
Degitu Azimeraw of Ethiopia was second with compatriot Ashete Bekere third.
Kosgei, competing just 57 days after claiming Olympic silver in Tokyo, was aiming to follow in the footsteps of Germany’s Katrin Dorre and become only the second woman to win three back-to-back titles.
Lemma breaks clear to claim victory
It was also an underwhelming outing for the men’s defending champion Shura Kitata with the Ethiopian, hampered by a hamstring niggle, finishing sixth in 2:07.51.
He finished a little over five minutes ahead of Britain’s Philip Sesemann as the former middle-distance specialist made an impressive marathon debut at 29.
Lemma, who finished third on last year’s Covid-enforced closed course, turned up the pace at a similar point on the route to Jepkosgei with similarly successful result, crossing the line 27 seconds ahead of his nearest rival.
But the winner was not allowed to stand on the victory podium alongside Kenyans Vincent Kipchumba and Mosinet Geremew – who came second and third respectively – because of coronavirus protocols.
Lemma’s fellow Ethiopian Kinde Atanaw, who won the 2019 Valencia Marathon, missed the race after testing positive for Covid on Friday afternoon.
No other athlete was barred from taking part after further testing but Lemma was taken back to his hotel after the race because he was a close contact of Atanaw.