The motion to create a medically-supervised drug consumption room was backed by 71 MPs against ten, reported Swiss media.
The pilot project would last three years and could concern some 600 drug users, reported broadcaster RTS.
The allocated space, planned for the Vallon district and costing an estimated 980,000 francs, would comprise four rooms for injecting and four for sniffing.
Lausanne is currently the only major city in Switzerland not to have an authorized place for drug-taking, mayor Daniel Brélaz told RTS.
The capital, Bern, was one of the first places in Europe to create a drug consumption room.
Similar policies are in place in other countries around the world including Germany, Canada, Australia and Norway.
The idea is to provide a clean, safe and supervised space in order to reduce the number of deaths relating to drug use, improve the health of drug users and stop drug-taking on the streets.
Such rooms are not thought to lead to an increase in the number of drug users.
Lausanne's initiative comes ten years after a similar plan was rejected by the city's residents in a referendum.
And there's no guarantee that this one will go ahead, since certain opponents intend to launch a campaign to push the idea to another referendum, according to Swiss media.