But 23-year-old Edris, the 2012 world junior 5,000m champion, surged past Sir Mo at the beginning of the final lap and held him at bay in the final few metres.
Edris won in 13 minutes, 33.79 seconds, .43 seconds ahead of Farah in second.
And they took aim at America's Kenyan-born bronze medallist Richard Chelimo for making Farah's trademark "Mobot" gesture and then running his hand across his throat as the 5,000m runners lined up before their race.
Farah retires from the sport at the end of August after the Diamond League final in Zurich. "If you say Mo Farah has done something wrong‚ prove it".
"It's like a broken record, repeating myself, if I've crossed the line, if Alberto's crossed the line...why bring it up year after year?"
Asked whether the 10,000m had impacted on his hopes of winning the 5000m, the 34-year-old said: "To be honest with you, it takes so much out of me".
"You guys, so many times towards me, you have been unfair".More news: Nawaz Sharif Criticises Pakistan's Judiciary For His Ouster
More news: FDA reports five deaths related to weight-loss balloons
More news: Facebook rolls out video shows, in new challenge
Farah sat patiently in the pack as Chelimo charged through the first lap in 62 seconds, the USA champion intent to make it a tough race after doing Farah's signature "Mobot" pose on the start line followed by a throat-slitting gesture.
"I knew I was going to beat Mo Farah", the new gold medalist said.
"Sometimes, I get emotional because track is where I've made it".
The pace was slow through the opening 3,000 meters, which was reached in just 8:32.93-jogging for athletes of their caliber. One of them was going to sacrifice himself, and that's what they did.
However, Muktar Edris of Ethiopia broke with his compatriot Yomif Kejelcha on the last lap and though the latter faded Farah was unable to chase down Edris and had to settle for a battling silver. "That's what they did and the better man won on the day".
"I gave it everything", said Farah who initially curled up on the track in defeat and then was pulled up by Edris.
The Observer remarked that those who had come in their thousands with their faces painted with "Go Mo!" and banners with "Run Farah Run" were to be left disappointed. In terms of major championships I'm done, that chapter of my life is closed and I want to start a new one and move on to the roads. "But this chapter is closed".