Yoon has acted like a president under siege, observers say.
In his address on Tuesday night, he recounted the political opposition's attempts to undermine his government before saying he was declaring martial law to "crush anti-state forces that have been wreaking havoc".
His decree temporarily put the military in charge - with helmeted troops and police deployed to the National Assembly parliament building where helicopters were seen landing on the roof.
Local media also showed scenes of masked, gun-toting troops entering the building while staffers tried to hold them off with fire extinguishers.
Around 23:00 local time on Tuesday (14:00 GMT), the military issued a decree banning protests and activity by parliament and political groups, and putting the media under government control.
But South Korean politicians immediately called Yoon's declaration illegal and unconstitutional. The leader of his own party, the conservative People's Power Party, also called Yoon's act "the wrong move".
Meanwhile, the leader of the country's largest opposition party, Lee Jae-myung of the liberal Democratic Party, called on his MPs to converge on parliament to vote down the declaration.
He also called on ordinary South Koreans to show up at parliament in protest.
"Tanks, armoured personnel carriers and soldiers with guns and knives will rule the country... My fellow citizens, please come to the National Assembly.”
Thousands heeded the call, rushing to gather outside the now heavily guarded parliament. Protesters chanted: "No martial law!" and "strike down dictatorship".
Local media broadcasting from the site showed some scuffles between protesters and police at the gates. But despite the military presence, tensions did not escalate into violence.
And lawmakers were also able to make their way around the barricades - even climbing fences to make it to the voting chamber.
Shortly after 01:00 on Wednesday, South Korea's parliament, with 190 of its 300 members present, voted down the measure. President Yoon's declaration of martial law was ruled invalid.