TRENTON, N.J., April 9 (Reuters) - The use of rap lyrics as evidence in their author's attempted murder trial came under fire on Wednesday in New Jersey's highest court, where justices and lawyers debated the possible risk to freedom of speech.

Donte Skinner was convicted of shooting and paralyzing Lamont Peterson, a fellow drug crew member, in a 2005 dispute over guns and money in Willingboro, New Jersey. At his trial, prosecutors introduced 13 pages of violent rap lyrics Skinner had written as evidence against him.

Hearing oral arguments over their use in court on Wednesday, New Jersey Supreme Court Justice Barry Alvin asked prosecutors to explain how the lyrics showed Skinner's motive when they were apparently written years before the shooting.

"You want to take rap lyrics that were drafted four to five years earlier and say that's relevant to someone's motive five years later?" said Alvin. "How do you get there?"

In the often-violent lyrics, Skinner boasts of being willing to perform drive-by shootings on crowded streets and commit acts so heinous that his enemy's mothers would wish they'd had abortions.

The main character in the lyrics was named "Threat," a moniker Skinner used on the streets and had tattooed on his arm.

At his trial, prosecutors acknowledged that the lyrics did not refer to the shooting or another crime. But they said the lyrics underscored a code of the streets that Skinner lived by.

"For people who don't understand, it opens the door to why this would happen," said deputy state Attorney General Joseph Glyn at the hearing.

The American Civil Liberties Union, which has weighed in on the case, argued that judges should consider the constitutional protection of freedom of speech when weighing the value of evidence.

"Skinner's writings addressed issues of social and political concern, and that is the plight and hopelessness of human beings in our inner cities," said Ezra Rosenberg, an attorney for the ACLU.

Skinner was sentenced to 30 years in prison.

His conviction was overturned in 2012, but he remains incarcerated. Wednesday's hearing addressed an appeal filed by prosecutors objecting to his conviction being overturned.

The ACLU said Skinner's is one of about 18 cases nationwide in which rap lyrics were introduced to help convict defendants.

The ACLU argued that Skinner's rap lyrics provide no more evidence than did Bob Marley's "I Shot the Sheriff" or Queen's "Bohemian Rhapsody," with the lyrics "Mama, just killed a man."

The justices did voice concern that artists could find themselves in legal trouble over the content of their work.

"I think authors will have to be nervous," said Justice Jaynee LaVecchia.

But prosecutors argued that writers' liberties would not be threatened.

Glyn noted that Johnny Cash wrote the words "shot a man in Reno just to watch him die" in the song "Folsom Prison Blues."

"Nobody would pick that lyric and say, 'Let's put him on trial just for writing that lyric,'" Glyn said.

"If Johnny Cash was accused of shooting someone in Reno, then maybe that lyric would be relevant," he added.