With the selection, the Chinese city will become the first to host both winter and summer games. Beijing hosted the 2008 Summer Games.
With a vote of 44 to 40, Beijing beat out Almaty, the biggest city in Kazakhstan.
In a press release, the IOC said: "Beijing aims to use the Games to accelerate the development of a new sport, culture and tourism area, and to encourage interest in winter sports in a region that is home to more than 300 million people in northern China."
The bidding process for these Olympic Games was not without controversy.
As NPR's Tom Goldman told Morning Edition, Munich and Stockholm dropped out of the bidding process because they were afraid of the costs.
Eventually, Tom says, the IOC went with the safe choice. Almaty is, of course, lesser known, but it offered real snow.
Beijing will have to rely on man-made snow, and some of the mountain venues in Beijing are 100 miles away. But, Tom adds, it will save on some costs by reusing some of the same venues it built for the 2008 games: The so-called Bird's Nest Stadium, for example, will be used for the opening and closing ceremonies, and the Water Cube will become the Ice Cube.
NPR's Anthony Kuhn was recently in a village near the city of Zhangjiakou, some 120 miles northwest of Beijing, where most of the downhill events will take place.
"I'm walking down the main street of the village that is supposed to be a transport hub, after they construct a high-speed railroad from Beijing," Anthony says. "Right now, there's not much to look at though, it's just a main street, with simple, low-slung farm houses on either side. Most people just sit around by the side of the road, when they're not in the fields farming their cabbages."
He notes that the planned train is expected to cut the three-hour drive from Beijing down to 45 minutes.