A Lionel Messi hat-trick ensured Argentina came from behind to win in Ecuador and avoid missing a World Cup finals for the first time since 1970.
The 2014 runners up began the day sixth in the group and needing a top-four place to qualify automatically.
They made a terrible start in Quito, losing a goal inside 38 seconds, but fought back with Messi to the fore.
“Luckily the nationality of the best player in the world is Argentinian,” said coach Jorge Sampaoli.
“We must be sure everything does not depend on Leo [Messi] but today he brought his great ability.
“I told the group: Messi did not owe the World Cup to Argentina, but football owed the World Cup to Messi. We should help him be in the World Cup.”
The Barcelona forward equalised in the high-altitude Ecuadorian capital after 12 minutes when he linked up with Paris St-Germain midfielder Angel di Maria and stabbed home.
The five-time world player of the year’s second goal came eight minutes later with a powerful strike from the edge of the area before a fine solo goal in the second half sealed the victory and Argentina’s passage to Russia.
However, Chile – the winners of the last two Copa America titles – are out after losing 3-0 in Brazil.
Brazil had already qualified and Luis Suarez scored twice as Uruguay beat Bolivia 4-2 to qualify, with Colombia also advancing after a 1-1 draw in Peru.
Peru finished fifth in South American qualifying and will now meet New Zealand in a two-legged play-off.
Chile, who have won the last two Copa America tournaments, were aiming to qualify for their third successive World Cup after reaching the last 16 in 2010 and 2014.
However, they will be one of the most notable absentees in Russia next summer.
They began the final round of matches in third place in the table, but fell behind to two Brazil goals in three second-half minutes from Paulinho and Gabriel Jesus.
With Peru scoring a late equaliser against Colombia, Chile needed to score to be in the play-offs and had everyone in the Brazil half – including Manchester City goalkeeper Claudio Bravo – in injury-time.
However, the attack broke down, Brazil launched the ball forward and Jesus walked the ball into the net for his second with his City team-mate Bravo stranded to confirm Chile’s elimination.