Sochi defeated the South Korean city of Pyeongchang in the final round of a vote by the International Olympic Committee.
The Austrian resort of Salzburg was eliminated in the first round of the secret ballot, setting up the decisive head-to-head contest between Sochi and Pyeongchang. The vote totals were not immediately released.
The result was a triumph for Putin, who put his international prestige on the line by coming to Guatemala to lobby IOC members and lead Sochi's final formal presentation to the assembly. Putin had left by the time the result was announced.
Ninety-seven IOC members were eligible to vote in the first round. Members from bidding countries are ineligible to vote as long as their cities remain in contention. With Salzburg out, 100 delegates were eligible in the second round.
Russia, an Olympic power which has won 293 Winter Games medals, has never hosted the Winter Games. That was a strong point in Sochi's favor with the IOC, which likes to spread the Olympics to new host countries. Moscow hosted the 1980 Summer Games, which were hit by the U.S.-led boycott following the Soviet invasion of Afghanistan.
The Sochi bid won out over the appeals of its rivals — Salzburg, presenting itself as a safe, no-risk winter sports mecca at the heart of Europe with world-class venues already in place; and Pyeongchang, offering the potential for peace and reconciliation on the divided Korean peninsula and promoting winter sports in Asia.
Putin's government has pledged $12 billion to develop Sochi into a world-class winter sports complex linking the palm-lined Black Sea coast — the so-called "Russian Riviera" — to the soaring Caucasus mountains nearby.
Putin, one of the world's most powerful figures, emphasized his commitment by making a rare formal presentation in English to the IOC. He praised Sochi's natural setting, saying, "On the seashore you can enjoy a fine spring day, but up in the mountains, it's winter ... a real snow is guaranteed."
Although the site would have to be built largely from scratch, Putin assured, "We guarantee the Olympic cluster in Sochi will be completed on time."
"No traffic jams, I promise," he said with a smile.
Noting that athletes would have a short walk to their venues, Putin said, "Five minutes' walking distance, not bad."
It was the second straight first-round defeat for Salzburg, which also mounted a failed bid for the 2010 Winter Games, which went to Vancouver, British Columbia.
The Austrians were squeezed out by the political and economic might of the Russian and Korean bids.