Foster, a former European 5,000m gold medallist and a Commonwealth champion at 10,000m, began his commentary career in 1980 and has since gone on to cover nine summer Olympic Games for the BBC.
"I have loved every minute of my time working for BBC Sport," said Foster.
It just seems the right time and the right place - at a World Championships in the UK - to say thank you and goodbye
"It has been a privilege and I am very lucky to have done what I have done since my competitive career finished."
The BBC's director of sport Barbara Slater said: "Brendan's knowledge, instinct, tone, timing and skill have been wonderful to listen to, and he has given all of us so many great moments.
"His words and iconic commentaries will be heard for years to come."
Foster, 69, was named BBC Sports Personality Of The Year in 1974 after winning gold over 5,000m at that year's European Championships in Rome, as well as setting a new world record over 3,000m at his home track in Gateshead.
After retiring from the track he became one of the leading voices of the BBC's athletics coverage, taking in every Commonwealth Games since 1982 and every World Athletics Championships since the inaugural event in 1983.
He has also been ever present at the London Marathon since its inception in 1981, with this year's event on 23 April to be his 37th and last.
Foster said: "My very first commentary was shortly after the 1980 Olympics at a cross-country event at Gateshead and that's when I started to work with the greatest sports broadcaster of all time, David Coleman.
"David was just so professional and diligent and he taught me so much. After David retired, Steve Cram took over and working with Crammy for almost 20 years has been so special too.
"We have had so many special days, and those recently with Sir Mo Farah winning golds galore, particularly at the Olympic Games, are commentaries that stick out in the memory as we have witnessed true greatness.
"It's also been an honour to work with so many great people who have been a part of the BBC Athletics team - both in front of and behind the camera."
Media playback is not supported on this device

South Western Ambulance Service said it did not know how the incident involving the man - thought to be in his 20s - happened.
Great Western Air Ambulance flew him to Queen Elizabeth hospital in Birmingham after the ambulance service was called at about 17:10 BST.
Wiltshire Air Ambulance had also been called after the man suffered significant burns at the Somerset site.
Final preparations are taking place for the 2016 edition of the festival which opens its doors to the public on Wednesday.

Brookfield Renewable UK applied to develop a site at Larbrax, near Leswalt in Wigtownshire.
Dumfries and Galloway Council's landscape architect objected to the plans, claiming it would have an adverse visual impact on the surrounding coastal area.
Scottish Natural Heritage also raised "significant and serious concerns".
A spokesman for Brookfield Renewable UK said: "It is disappointing that the Dumfries and Galloway planning committee have failed to recognise both the many positive long-term economic benefits the Larbrax Wind Farm would bring to the Wigtownshire area, and also the limited effects of the proposal.
"We appreciate that there is frustration locally following the decision and we would like to thank local residents and businesses for the time and support that they have afforded the project over the last three years.
"We maintain our position that this is an acceptable and beneficial scheme and we will now carefully consider our next steps."
Meanwhile, a separate proposal for a wind farm at Gass Farm, north-east of Glenluce, has been approved.
Councillors backed WilloWind's plans for the nine-turbine development, subject to strict conditions.
BBC commentator Brendan Foster is to retire following August's World Athletics Championships in London.
[NEXT_CONCEPT]
A man has suffered severe burns at the Glastonbury Festival site.
[NEXT_CONCEPT]
Plans to build eight new wind turbines in the far south-west of Scotland have been rejected by councillors.