Alonso will race for the Honda-powered Andretti team, with his car branded as a McLaren.
The 35-year-old has the full support of both McLaren and engine partner Honda.
Alonso has reitired form both the Australian and Chinese Grand Prix this season, with his McLaren struggling at the back of the field.
McLaren are yet to decide who will replace the Spaniard in Monaco, but the teams ambassador Jenson Button could make a shock return.
Button, the 2009 world champion, retired from F1 at the end of last season.
Fernando Alonso will miss this year's Monaco Grand Prix so he can race in the Indianapolis 500
Alonso said: “I’m immensely excited that I’ll be racing in this year’s Indy 500, with McLaren, Honda and Andretti Autosport.
“The Indy 500 is one of the most famous races on the global motorsport calendar, rivalled only by the Le Mans 24 Hours and the Monaco Grand Prix, and it’s of course a regret of mine that I won’t be able to race at Monaco this year.
"But Monaco will be the only 2017 Grand Prix I’ll be missing, and I’ll be back in the cockpit of the McLaren-Honda MCL32 for the Canadian Grand Prix in Montreal in early June.
“I’ve never raced an IndyCar car before, and neither have I ever driven on a super-speedway, but I’m confident that I’ll get to grips with it fast.
2017 F1 Calendar Wed, January 18, 2017
Express Sport brings you the complete Formula One 2017 race calendar
Play slideshow AFP/Getty Images 1 of 21
Express Sport brings you the full Formula One 2017 calendar
Get Quotes on Home Insurance
Fernando Alonso's McLaren have struggled this season
"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, practising our McLaren-Honda-Andretti car at Indy from May 15th onwards, hopefully clocking up a large number of miles every day, and I know how good the Andretti Autosport guys are.
“I’ve won the Monaco Grand Prix twice, and it’s one of my ambitions to win the Triple Crown [the Monaco Grand Prix, the Indianapolis 500 and the Le Mans 24 Hours], which has been achieved by only one driver in the history of motorsport: Graham Hill."
McLaren’s executive director Zak Brown added: v“As an American, albeit one who fell in love with Formula 1 at a very young age, I’ve always regarded the Indy 500 as a fantastic motor race.
Jenson Button could be set for a shock return to the paddock
“For that reason I’m particularly delighted to have been able to bring McLaren back to Indianapolis in my very first year as McLaren’s Executive Director.
"Michael [Andretti] is an old friend of mine, and a man I respect enormously, and his Andretti Autosport organisation is one of the best in the business. Michael is a winner – indeed his team won the Indy 500 last year with Alexander Rossi, who will be one of Fernando’s team-mates at Indy next month – and I couldn’t be happier that Fernando will be making his IndyCar debut in one of Michael’s cars.
“Equally, this project wouldn’t have been possible without Honda’s support and encouragement. And our car – the McLaren-Honda-Andretti – will be decked out in the papaya orange livery made famous by our founder Bruce McLaren, and in which Johnny Rutherford drove McLaren IndyCars to Indy 500 victory in both 1974 and 1976.
“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. Put it this way: the team he’ll be racing for won the race last year, using the same Honda engine, and he’s the best racing driver in the world. That’s quite a compelling combination. So, yes, as I say, he’ll be in the mix."