The American is expected to concentrate on two butterfly and two individual medley events as well as three relays.
His coach Bob Bowman said Phelps was “removing the individual 200m freestyle from his Olympic programme. This will give him a full slate of seven events.”
Phelps is the most successful Olympian ever, having won a total of 14 golds, including eight in Beijing in 2008.
Phelps had seemed ready to compete in eight events after he won three at the US trials.
But although he won the 200m freestyle in Beijing four years ago, he has since been beaten over that distance in the last two World Championships.
US head coach Gregg Troy said Ricky Berens, who finished third in the 200m freestyle at the trials, would replace Phelps in London.
“It was a fun week but there are still a lot of things that need to be perfected,” said Phelps after the trials.
“It shows that I can do it in a programme at a high level again. I was struggling over the last few years.”
He has won a total of 38 world and Olympic gold medals in his career but admitted he struggled for motivation after Beijing 2008.
He has also faced increasing competition from fellow American Ryan Lochte, who will now be favourite for the 200m freestyle after Phelps’s withdrawal.
At last year’s World Championships in Shanghai, Lochte, 27, won five titles, one more than Phelps, who is also 27.
The Phelps and Lochte rivalry is expected to be one of highlights of the Games, which begin later this month.