In what was his last major track appearance before retirement later this month, the 34-year-old finished with a time of 13 minutes 33.22 seconds - almost one second behind gold-winner Muktar Edris of Ethiopia.
Kenyan-born Chelimo took the bronze in 13:33.30 while Farah's late burst also consigned another Ethiopian Yomif Kejelcha to fourth place in 13:33.51.
"I gave it all but I had nothing left at the end", a crestfallen and emotional Farah said.
"Tactically, I was trying to cover every move", said Farah, after being consoled by his wife and four children at trackside.
The 34-year-old had been unbeaten for six years against the best in the world.
Having won gold in the 10,000m Farah was the favourite to take the 5,000m gold as well.
Utah school districts prepare for solar eclipse on first day
There has been a lot of talk already leading up to the eclipse but here are some numbers about the eclipse you may not know. This is explained further here: http://www.astrosociety.org/education/publications/tnl/05/stars2.html (link is external).
Quite simply, Farah will go down in history as Britain's best-ever athlete and one of the greatest the world has ever witnessed.
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.
Mo Farah missed out on the 5,000m and 10,000m double at the World Athletics Championships, bringing down the curtain on his track career at major events with a silver medal.
Roared on again by a home crowd, the Briton had looked comfortable from the start.
Farah is due to retire from the track at the end of the month, after the Diamond League final in Zurich, to focus on the marathon.