Inhabitants of St Moritz, Davos and the rest of the canton of Graubünden were asked to approve the millions of Swiss francs needed to cover the bid.
In St Moritz and Davos, the two municipalities directly involved in the candidacy, residents came out in favour, with the "yes" gaining 61 and 56.2 percent of the vote respectively.
But the rest of the canton did not agree, and in the end, 52.66 percent rejected the bid.
The result is a huge slap in the face for supporters of the bid, namely the Graubünden government, parliament, centre-right parties and business.
Federal sport minister Ueli Maurer’s department said in a terse statement it had taken note of the outcome, which ended the government’s planned involvement in the bid.
It comes 33 years since the last rejection of the Winter Olympics in the canton. In March 1980 some 77 percent voted against hosting the Games.
Plans to host the Winter Games in Bern in 2010 were also scuppered in a popular vote. The Games were held in Vancouver.
Switzerland, which is home to the International Olympic Committee, has only hosted the Games twice: in 1928 and 1948, also in St Moritz.
It suffered failed candidacies with Sion, in the canton of Valais, which aimed to host the 2002 and later the 2006 Games.
St Moritz had aimed to seduce the Olympic Committee with what it saw as a return to the source of winter sports.
Several cities have voiced their interest in hosting the 2022 Games, including Oslo, Barcelona and Munich, as well as Krakow in Poland in cooperation with neighbouring Slovakia.
The IOC will pick the host city for the Games in early August 2015 in Kuala Lumpur.