The referendum was held in the entire Swiss canton of Graubuenden, where both towns are located, and 52.66 per cent of voters said no while 47.34 percent were in favour. The turnout was 59.14 percent, according to the results published on the canton's website.
St Moritz, a playground for the rich and famous for its Cresta run and the annual polo World Cup on snow, was hoping to host the Games for the third time after staging them in 1928 and 1948.
Davos, which stages the annual World Economic Forum, has never hosted them.
The bid organisers had argued that the estimated investment of 4.3 billion Swiss francs would have been repaid by the boost in tourism. They said the bid was sustainable and environmentally friendly, and the whole country stood to benefit.
Opponents feared the impact of new buildings, stadiums, ski lifts and other infrastructure on the Alpine environment. They were also concerned that the initial budget would have spiralled out of control, as invariably happens with major sporting events.
"The rejection of the Olympic candidacy has stopped the Graubuenden 2022 project," said the Swiss Olympic Committee on its website.
"The Graubuenden 2022 movement regrets this decision which ends the only pioneering large-scale project for tourism, business and sports in Graubuenden.
"For the Graubuenden 2022 union, the vote is a big disappointment. The debate about the project has been very intense in all the valleys and linguistic regions and across all age groups and levels of society."
- Sports & Recreation