The Chinese capital beat Almaty of Kazakhstan by just 44 votes to 40, with one abstention, to become the first city to be awarded the summer and winter Games.
Beijing held the summer Olympics in 2008 in what was then seen as China sealing its place as an emerging superpower.
This time it had presented itself as a safe pair of hands against the former Kazakh capital which ate into China's support on the International Olympic Committee with an impressive late "Keeping It Real" campaign that played on China's reliance on artificial snow and the vast distances between its venues.
The 2022 Games will be held in March 2022 during the Lunar New Year and with many outdoor events held against a backdrop of the Great Wall of China.
Asia will also host the 2018 Winter Olympics in Pyeongchang, South Korea.
Six cities had entered the race for 2022 but Beijing and Almaty were left as the only candidates when Oslo, Stockholm, Krakow in Poland and Lviv in Ukraine withdrew for financial and political reasons.