The 37-year-old Spaniard is competing in his 17th Formula One season and his fifth with McLaren, and has been widely tipped to race in the Indianapolis 500 next year as he attempts to win the 'Triple Crown of Motorsport.'
Alonso, a double Monaco Grand Prix winner, won the Le Mans 24 Hours on his debut with Toyota in June this year and is ninth in the Formula One drivers' championship standings.
"After 17 wonderful years in this amazing sport, it's time for me to make a change and move on," Alonso said.
"There are still several grands prix to go this season, and I will take part in them with more commitment and passion than ever."
McLaren worked with Andretti Autosport to field a car for Alonso for the 2017 Indy 500 where the Spaniard put himself in contention leading for 27 laps before suffering engine failure with 21 laps remaining.
McLaren has been exploring the possibility of working again with Andretti to field an IndyCar team to run the entire series next year or might consider putting together their own team.
Ryan Hunter-Reay, the winner of the 2014 Indy 500 and a teammate of Alonso's with Andretti for the one race, said the Spaniard would be welcomed back and would be a great addition to the series.
"It would be appealing to me if I were him," said Hunter-Reay during a conference call ahead of this weekend's IndyCar race at Pocono.
"I spent time with him as his teammate and know he's as hungry as ever to win.
"We worked very well together and would welcome him no doubt, but I have no idea where this whole thing is going right now.
"I don't know where McLaren stands with it... a lot of speculation at the moment but I think he would be a great addition to IndyCar and have a lot of fun here."
Alonso thanked Formula One Chief Executive Chase Carey and the sport's owner Liberty Media Corp for trying to get him to change his mind and left the door open on a possible return to the circuit.
"I know (McLaren) will come back stronger and better in the future, and it could be the right moment for me to be back in the series; that would make me really happy," he added.
"I made this decision some months ago, and it was a firm one. Nevertheless, I would like to sincerely thank Chase Carey and Liberty Media for the efforts made to change my mind."