While Kazakhstan had hoped to bring the games for the first time to Central Asia, Beijing's selection means East Asia will play host to three straight games: the 2018 Winter Olympics in South Korea and 2020 Olympics in Tokyo.
Ahead of the IOC vote, both the Almaty and Bejing bids had drawn criticism from human-rights groups.
Human Rights Watch has cited violence and discrimination that lesbian, gay, bisexual and transgender people face in Kazakhstan, according to the AP, while activists say China's human-rights record worsened rather than improved after the 2008 Olympics.
Cassandra Vinograd is a Senior Writer and News Editor. Before joining NBC News, she worked as a London-based correspondent for The Associated Press and specialized in politics, foreign affairs and defense.
Vinograd previously worked as an editor for The Wall Street Journal in Brussels and London.
She has reported extensively from Afghanistan and on West Africa and the Middle East.