The court in the southwestern city of Abha "overturned the previous sentence to execute him for apostasy," the lawyer for Ashraf Fayad said in a statement he posted on Twitter.
The ruling follows widespread international criticism of the rising number of executions by the ultra-conservative Islamic kingdom.
Fayad was also sentenced to 800 lashes, in sessions of 50 lashes, his lawyer Abdul Rahman al-Lahim said.
The poet must repent through an announcement in official media.
The defence objects to the new ruling and has asked for Fayad's release, Lahim added.
A lower court in November issued the rare death sentence for apostasy, apparently after an appeal.
That decision overturned another court ruling in 2014 sentencing Fayad to four years' prison and 800 lashes, Adam Coogle of Human Rights Watch said at the time.
Signup to our newsletter and follow us on Facebook and Twitter!
The complaint against Fayad stemmed from a cultural discussion group at a cafe in Abha.
"What Ashraf claims is that he had a falling out with other members of the group," said Coogle, a Middle East researcher for the New York-based HRW.
One man claimed he heard Fayad say things against God, while a religious scholar accused Fayad of blasphemy in a volume of poetry he had written a decade previously, Coogle said.
At the first trial, witnesses for Fayad testified that the man who complained was probably "out to get him".
Under Saudi Arabia's strict Islamic legal code, murder, drug trafficking, armed robbery, rape and apostasy are all punishable by death.
In 2015 the kingdom executed 153 people, mostly for drug trafficking or murder, according to an AFP tally.
Amnesty International says the number of executions in Saudi Arabia last year was the highest for two decades.
However, the tally was far behind that for China and Iran.