Sir Mo had fought desperately to claw back the deficit in the finishing straight but Edris held on to win in 13 minutes and 32.79 seconds.
Farah still doubled Great Britain's medal tally, remaining the only GB athlete to have won any honour at the home championships.
"I gave it my all, 110 percent", said Farah.
Claiming to have been exhausted after his 10,000m efforts and 5,000m heats, he added: "Tactically, I was trying to cover every move".
Paul Chelimo of the United States took bronze.
Former CNN conservative commentator Kayleigh McEnany joins Trump's "real news" initiative
Colbert: After Lara Trump's effort, Colbert labeled the video series "state-sponsored propaganda", reports Time . "Wow. That McEnany tweet wasn't the only one that raised eyebrows today.
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. The better man won.
Farah admitted after last Saturday's 10,00m victory that his quest for a double World Championship gold would be "tough" - and it showed as the 34-year-old struggled to assert his authority on tonight's race.
The four-time Olympic champion was beaten in the shorter distance by Ethiopia's Muktar Edris in a thrilling final.
Farah and his team-mate Andrew Butchart had tried to break up the field with 600 metres to go in a race that had been run at generally a very slow pace.
Into the last 800m however and they ate Tiernan up, though the truth is Farah never looked entirely comfortable: they hit the bell in 12:40.17, and Farah was chasing all the way down the backstretch, unable to get himself in front when he either wanted to or needed to.