CAIRO — Egypt’s highest appeals court on Sunday suspended the prison sentence of Ahmed Naji, a prominent writer who had been convicted on charges of obscenity, in a decision that paved the way for his release, his lawyer said.

Mr. Naji, 31, was charged last year with violating public morality with references to sex and drug use in his novel “The Use of Life.” He was sentenced in February to two years in prison and fined over $1,200, spurring outrage among human rights defenders and artists across the world.

In May, over 120 prominent writers and artists, including Woody Allen, signed a letter demanding Mr. Naji’s release. The letter was sent by PEN America, a group that promotes freedom of expression, which this year awarded Mr. Naji its annual Freedom to Write prize in absentia.

Mr. Naji’s lawyer, Mahmoud Othman, said he expected his client to be released from jail on Monday. The appeals court will review Mr. Naji’s suspended sentence in January.