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.
Also Read
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.
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.
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.