Earlier, Sally Pearson produced one of the great comebacks in World Championship history, winning the 100m hurdles five years after the Australian women won Olympic title on this track, and after two years of crippling injuries which threatened her career.
However, Edris and team-mate Yomif Kejelcha seized the initiative as the bell went and Farah struggled to go with them.
Farah, who had not lost a final in 2,176 days, having also won the 10,000m and 5,000m at the 2013 and 2015 World Championships, crossed the line in 13 minutes 33.22 seconds.
Farah, a two-time double world champion and two-time double Olympic champion, finished in 13:33.22.
"I gave it all but I had nothing left at the end", a crestfallen and emotional Farah said.
Tributes flow for legend Betty Cuthbert
After being diagnosed with Multiple Sclerosis (MS ) in 1979, she spent much of her later life in a wheelchair as the disease took its toll.
In a tactical race, Farah could not respond to a challenge for the first time in six years, turning his farewell race on the track at a major championship into a disappointment. The better man won.
Paul Chelimo tried to stretch things out in the early stages of the race, while Ethiopia's Selemon Barega and Patrick Tiernan, of Australia, took it in turns to pick up the pace midway through.
Roared on again by a home crowd, the Briton had looked comfortable from the start. Farah will now move on to concentrate on marathon running.
As the group went through the 3,000m mark Australian Patrick Tiernan was the one who chose to change the pace and he opened up a little gap between Chelimo, Farah and the rest of the pack.