The two showpiece races take place on May 28 and McLaren -- whose fortunes have plummeted in F1 -- "will enter a single car in the 101st Indianapolis 500," said a team statement.
McLaren did not say who will take the Spaniard's place for the Monaco race, one of the highlights of the grand prix calendar.
However, his absence sparked speculation that his position could be filled in Monte Carlo by Britain's Jenson Button, another ex-Formula One world champion, who remains under contract in an ambassadorial role with McLaren.
The 2005 and 2006 F1 champion said he wanted to compete in the Indy 500 to have a chance of fulfilling a career ambition of completing motorsport's "Triple Crown" in winning the Monaco Grand Prix, the Indy 500 and the Le Mans 24 Hours.
More From This Section
The only driver to achieve the feat was the late Graham Hill, with the British driver, like Alonso, a double F1 One world champion.
"I realise I'll be on a steep learning curve, but I'll be flying to Indianapolis from Barcelona immediately after the Spanish Grand Prix," said Alonso.
Alonso is now in the final year of what has been a largely frustrating three-season deal with McLaren, with his failure to finish last week's Chinese Grand Prix in Shanghai the latest disappointing result.
He joined in the hope of winning a third world title, after two triumphs with Renault, but his best results have been three fifth places, with much of the blame attributed to the poor performance of the Honda engine.
"Monaco will be the only 2017 Grand Prix I'll be missing, and I'll be back in the cockpit of the McLaren-Honda for the Canadian Grand Prix in Montreal in early June," he said.
The Andretti team won the race last year, with rookie driver Alexander Rossi the shock champion in the 100th running of the Indianapolis 500.
Andretti chief Michael Andretti, a former IndyCar champion who raced in F1 for McLaren, said Alonso was capable of repeating Rossi's achievement.
"Fernando's lack of experience on super-speedways is not of concern to me," said Andretti.
Meanwhile McLaren boss Zak Brown, who will also be in Indianapolis instead of Monaco, said: "Could Fernando win this year's Indy 500? Well, I wouldn't be so silly as to make any such rash prediction, but I expect him to be in the mix."
McLaren won the Indianapolis 500 with their own car in 1974 and 1976, but IndyCar is now a 'spec' formula where all teams use the same basic car, although different engine manufacturers are allowed to design their own aerodynamic bodykits.