The IAAF says Bolt will compete in the 100m on Friday evening and in the 4x100m on Saturday afternoon in the Queen Elizabeth Olympic Park.
The Jamaican sprinter will compete at the IAAF Diamond League in London for the first time since 2009.
“I’m looking forward to coming back to the UK, especially with it being a year since winning three gold medals in the Olympic Stadium. The crowd was amazing at the Games, and I hope they will be out again in their numbers at the end of July,” Bolt said.
“I haven’t competed at the London Diamond League since 2009, but it has always been a great meet with lots of Jamaican support; it almost feels like running at home.”
The London Diamond League is the last major meeting before IAAF World Championships in Moscow, which will be held between August 10 and 18.
The IAAF also announced that St Kitts’ 2003 World champion Kim Collins will run against Bolt in the 100m.
“To have the opportunity a year on to run in the stadium is something that I’m really grateful for. The support I get from the British crowds every year is incredible,” said Collins, who is 11 years older than Bolt.
“I’m looking forward to hearing that roar when I come out onto the track in July. This is my Olympic final, and I’m going to take full advantage of the occasion and show that, even at 37, I’m still a force to be reckoned with.”