Farah has won the world title at the last three championships.
Farah, who is planning to turn his attention to road racing, completed the 10,000m/5,000m double at the 2012 and 2016 Olympics, and the 2013 and 2015 worlds.
Ethiopian Edris, who had never beaten Farah in five previous meetings, was the stronger going down the home straight fending off Farah's desperate attempts to reel him in.
In the end, it was a tremendous race as Edris, Farah, Paul Kipkemoi Chelimo and Yomif Kejelcha separated themselves from the field on the back straight of an exhilarating final lap.
Britain's track knight had to settle for the silver in the 5,000m as he was denied an 11th successive gold at world or Olympic level in the final championship race of his glorious career.
Yet even in defeat, Farah demonstrated his champion's spirit as he fought back in the dying metres when it looked as if he would be shut out of the medals completely.
"I don't think there was any more I could have done".
Pep Guardiola hands Mangala chance to rebuild his Manchester City career
But that patience appears to be wearing thin after the fleet-footed winger made only nine Premier League starts last season. The next three or four years City will buy one, two maybe three players.
"Tactically, they worked as a team", said Farah. It's not an excuse, but it took a lot more out of me than I realised.
"I have to focus on myself".
Now aged 34, old though certainly not ancient, Farah had only lost one of his 23 races at 5,000m since moving to Alberto Salazar, still under investigation by the US Anti-Doping Agency into his methods of training at the Nike Oregon Project. "I gave it all, I didn't have a single bit left at the end".
He claimed the 10,000m title once again last Friday, only to suffer his first loss in a final for 2,176 days on Saturday night in front of another huge London Stadium crowd.
"It was close but not close enough but when I reflect I've got to be happy with that in my first-ever high jump final", she said.
Farah will run in Birmingham next Sunday before ending his track career in Zurich.