Labour, Conservative, Liberal Democrat and Green MSPs all backed a motion demanding his resignation but were defeated by 67 votes to 57. Parliament's two Independent MSPs voted with the SNP.
The no-confidence vote - only the third in Holyrood's 15-year history - followed a week of mounting pressure on Mr Neil over his role in a health shake-up in Lanarkshire.
He was accused of misleading parliament and breaking the Government's ministerial code of conduct after he told Lanarkshire NHS to overturn a decision to shut a mental health ward at Monklands Hospital, in his Airdrie and Shotts constituency.
The move, within days of his appointment as Health Secretary in September 2012, reversed a plan to concentrate beds at Wishaw and Hairmyres hospitals.
The original proposals, viewed by the health board as best for patients, had been approved by his predecessor Nicola Sturgeon.
After issuing the instruction Mr Neil put the matter in the hands of his deputy and told MSPs he was not involved.
Yesterday's vote followed a Holyrood debate in which Mr Neil was defended by Alex Salmond, who insisted the cabinet secretary had acted properly. The row also dominated clashes between Mr Salmond and Scots Labour leader Johann Lamont at First Minister's Questions.
Speaking after the vote last night, Ms Lamont said: "This is a black day for the Scottish Parliament and a black day for our democracy."
In a new twist to the row, she accused Mr Salmond of misleading parliament after the First Minister confirmed he was aware of a private email in which Mr Neil instructed NHS Lanarkshire to retain beds at Monklands.
She said: "Alex Salmond admitted today that he had seen the crucial emails which prove that Alex Neil misled the people and parliament of Scotland over his Monklands decision - yet he cleared him.
"This started with Alex Neil misleading parliament. Now it looks as though Alex Salmond has repeated that offence to try and save his minister."
Greens leader Patrick Harvie also hit out after the vote.
He said: "Alex Neil handled this matter badly. He should have been far clearer about his role in this process, and the decision to hand the matter to Michael Matheson should have been taken as soon as Alex Neil became Cabinet Secretary."
Mr Neil, who is due to visit NHS facilities in Glasgow today, was present as opposition MSPs called for him to quit.
Labour's Richard Simpson told MSPs: "This is about a bad decision, badly made in what was a clear failure to separate personal interest as a constituency MSP from his role as a minister. It was an abuse of power compounded by misinforming parliament, continued involvement and covering up. He must see his position is untenable. He should do the decent thing and resign."
Michael Matheson, the public health minister, denied Labour claims Mr Neil had faced a conflict of interest in breach of the ministerial code of conduct.He argued there was no conflict of interest because Mr Neil's instruction to keep beds at Monklands led to a wider restructuring of services across Lanarkshire.
He said no health minister had been attacked before for saving part of the NHS, adding: "But then there is no smear story too low for the Labour Party, no accusation they would not seek to use against this SNP government - that's what we've seen today."