The no-confidence motion needed to secure 201 of the 400 votes in parliament to succeed, but fell short with 177 votes, national assembly Speaker Baleka Mbete announced.
Criticism of Zuma from within the African National Congress (ANC) has grown amid multiple corruption scandals and mounting economic woes, and the celebrated party of Nelson Mandela has declined sharply at the polls.
But ANC officials and most analysts had predicted that the president would survive the vote given the party’s large parliamentary majority.
The ANC parliamentary party celebrated victory over what it described as an attempted “soft coup”.
“It has been the publicly stated intention of the opposition… to collapse government, deter service delivery and sow seeds of chaos in society to ultimately grab power,” it said in a statement.
Several opposition parties led thousands of anti-Zuma protesters outside the national assembly before the vote, while supporters of the president held a rival march.
Zuma, who has built up a network of loyalists in the ANC since coming to power in 2009, has survived several previous parliamentary votes but these had been held without secret balloting.
Download our app and read this and other great stories on the move. Available for Android and iOS.