A recorded message in which Peake wished the competitors luck was played on big screens before the runners set off in London and the 44-year-old astronaut began his own run on board the International Space Station.
Kenyan long-distance runner Eliud Kipchoge won the men's race, in a course record time of two hours, three minutes and four seconds to triumph at the event for the second year in a row.
His time was the second fastest of all time and only seven seconds outside the world best set at the 2014 Berlin Marathon by fellow Kenyan Dennis Kimetto.
Kipchoge broke clear of another Kenyan, Stanley Biwott, with about three kilometers to go and sprinted home well ahead of Biwott with track legend Kenenisa Bekele of Ethiopia in third.
Fellow Kenyan Jemima Sumgong won the women's event with a time of two hours 22 minutes and 58 seconds, after suffering a nasty fall late in the race.
Sumgong banged the side of her head on the road in a tangle with three other runners at a drinks station.
With the side of her head cut, she bravely got up to rejoin the leaders and eventually pull away from last year's winner, Tigist Tufa of Ethiopia, in the closing stages.
Marathon in a harness
Peake, the first British European Space Agency astronaut, ran the race for real in 1999, completing the 26.2-mile (42.16-kilometer) course in a time of three hours and 18 minutes, according to event organizers.
His latest effort was vastly different.
Peake wore a harness that straps him to the space station's treadmill while watching a virtual-reality video simulating the marathon course.
The video was populated with avatars depicting actual London Marathon runners who are using the Run Social app as they race.
Peake was hoping to complete the race in a time of around four hours, marathon organizers said, but easily surpassed that by crossing the line in three hours 35 minutes and 21 seconds.
His physiology was also monitored to assess how his body fares with the exertion in orbit.
Two of his colleagues from the European Space Agency were also running in London in replica space suits, marathon organizers said.
Not the first
Peake, who arrived at the International Space Station in December, is not the first astronaut to run a marathon in space.
NASA's Sunita Williams ran on the space station treadmill during the Boston Marathon in 2007, completing the course in for hours and 24 minutes.
London organizers said record numbers are expected this year, with more than 40,000 runners registered and more than 39,000 predicted to take part.
This year's event will see the millionth runner in the history of the annual London race cross the finish line, organizers said.