Yahaya Aminu Sharif was convicted of having shared a blasphemous message on WhatsApp and was sentenced to death in August 2020 by a sharia court.
The high court in Kano threw out the conviction and ordered a retrial but Sharif appealed, challenging the constitutionality of the religious law.
Judge Abubakar Muazu Lamido said on Wednesday the challenge by Sharif, who has been in prison since 2020, was unfounded and was made "more out of sentiment than (in line with the) law".
"The appeal is devoid of merit and is therefore dismissed," Lamido said in a ruling delivered via Zoom.
The Kano state government also opposed the appeal which was heard in June, arguing that sharia does not violate the national charter, a view held by many in northern Nigeria
In 2020, when Sharif was sentenced to death, a teenager was jailed for 10 years by Kano Sharia Court over similar accusations.
The rulings drew international condemnation and the secular branch of the state's high court freed the teenager but ordered a retrial for Sharif.
Sharif's lawyer said he would study Wednesday's judgment before responding.