The court overturned the law following an appeal by a human rights group, which argued it suppressed freedom of expression, The Tripoli Post reported.
The law, passed in May, said "praising or glorifying Moammar Gadhafi, his regime, his ideas or his sons … is punishable by a prison sentence." The prison sentence was not specified within the wording of the law, though terms could range from three to 15 years, the Post reported.
Lawyer Saleh al-Marghani urged Libya's Supreme Court to overturn the law this month, saying it violated basic freedoms and human rights.
"The law itself helps to glorify Gadhafi more than keep it in check. We ask the court to accept our appeal," Marghani said.
Members of Congress to keep receiving porn magazine
Justin Bieber crashes Drake Bell's album release party