The double world champion, who turned 41 on Friday, will replace German driver Sebastian Vettel, a four-time champion, who last week announced his retirement from Formula One at the end of the current season.
"The whole company is very excited to bring Fernando's incredible experience and brilliant pace and racecraft to the team," Aston Martin said.
"The recruitment of a special talent such as Fernando is a clear statement of intent from an organisation that has committed to developing a winning Formula One team."
Alonso, who won his world titles in 2005 and 2006, said the Aston Martin team, which is owned by Canadian billionaire Lawrence Stroll whose son Lance drives the other car, "is clearly applying the energy and commitment to win" and is "one of the most exciting teams in Formula One today".
"I have known Lawrence and Lance for many years and it is very obvious that they have the ambition and passion to succeed in Formula One," said Alonso who came eighth in Sunday's Hungarian Grand Prix and is currently 10th in the world championship standings.
"I still have the hunger and ambition to fight to be at the front, and I want to be part of an organisation that is committed to learn, develop and succeed.
"I intend to win again in this sport and therefore I have to take the opportunities that feel right to me."
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.