The motion, put forward by the minority Parti Québécois government, asked for the removal of the flag from the Red Room, used for official ceremonies in Quebec's national assembly during all proceedings and debates.
The vote, held this afternoon at the legislature, saw the motion defeated by 12 votes.
The Liberals and the Coalition Avenir Québec voted against the removal of the flag, while the PQ and Québec Solidairesupported its departure.
CAQ leader François Legault had previously said that his party, created as an alliance of federalists and separatists, would favour the status quo.
The Liberals argued the flag should stay as long as Quebec remains a Canadian province.
In the past, the Maple Leaf only had a place in the legislature building when the Liberals were in power.
It was added to the committee chamber in the 1980s and '90s, and again by Jean Charest's government in 2003.
When the PQ came to power after the Sept. 4 election, the party moved to have the Maple Leaf removed.
However, the PQ's minority status and the CAQ's refusal to lend its support meant the motion generated an unusual amount of backlash.