Farah outsprinted training partner Bashir Abdi and Daniel Wanjiru to cross the line in Greenwich in 61 minutes 15 seconds, while Britain’s Charlotte Purdue also retained her title in the elite women’s race.
Purdue finished in a time of 70mins 38secs with Scotland’s Steph Twell claiming second place in 71:33 ahead of Charlotte Arter.
Farah revealed on Friday that he is considering a return to the track to defend his 10,000m title at this year’s World Championships.
The four-time Olympic gold medallist called time on his glittering track career in 2017 to concentrate on marathon running, but the 35-year-old is weighing up a comeback in Doha this autumn.
Farah told BBC Sport: “Conditions were a bit tougher than last year, very windy, but it was nice to get the job done and come first. It’s a nice stepping stone.
“Early on in the race I felt a bit sluggish and had a bit of cramp but dug in deep and got through it.
“When I’m in London, the crowds always deliver. It’s a great atmosphere and I enjoy racing at home. Training has gone well [for the London Marathon]. Obviously I’ll have to have a chat with my coach and see how I feel.
“I’m excited [about the London Marathon]. I feel like I have more experience than last year so I’ve just got to go out there and do the best that I can. But I know I can mix it with the guys for sure.
“After the marathon we’ll make a decision about what I want to do, but deep down I do miss the track.
“I look at my fellow athletes and I think ‘woah’ and I just get excited.”
Twell held a significant lead in the women’s race but was reeled in by Purdue in the closing stages as the English runner successfully defended her title.
“It’s brilliant to get the win,” said Purdue. “The weather was really windy so I knew it wasn’t going to be a really quick day.
“Some of the athletes went off really quick, but I knew they’d come back to me because the conditions didn’t indicate really fast times – so I followed my own race plan, and it paid off.
“It’s great to retain my title. I won here last year, and to win again is really good.”