Rick Ross, for example, took his stage name from a West Coast drug kingpin of the 1980s, Freeway Rick Ross. When he broke through as a performer in 2006, his streetwise image and rhymes about the Miami gangster lifestyle seemed like references to a shady past. In reality, he had once been a corrections officer.

Those who oppose the use of the lyrics say prosecutors have singled out rap as a literal evocation of reality when the lyrics in other musical genres have long been acknowledged as fictional.

One of the few criminal cases in which other kinds of artistic work played a role unfolded nearly three decades ago in Washington, where prosecutors introduced a piece of crime fiction in an assault case to show the author had a violent streak. The conviction was overturned by an appeals court, which said it rejected “the proposition that an author’s character can be determined by the type of book he writes.”

A brief filed in the Skinner case by the New Jersey chapter of the American Civil Liberties Union turns to “Crime and Punishment” and “Folsom Prison Blues” to make a similar point. “That a rap artist wrote lyrics seemingly embracing the world of violence is no more reason to ascribe to him a motive and intent to commit violent acts than to saddle Dostoyevsky with Raskolnikov’s motives or to indict Johnny Cash for having ‘shot a man in Reno just to watch him die.’ ”

In Kansas, lawyers for Philip D. Cheatham Jr., a drug dealer and aspiring rapper who faces a retrial in the double murder there, have argued that the lyrics being used against him, from his song “Prove Me Guilty,” are irrelevant and evidence of a double standard.

Mr. Cheatham, who previously served time for manslaughter, is charged in the 2003 murders of two women and the wounding of a third who was shot 19 times and is scheduled to testify against him. His song, which Mr. Cheatham said is actually titled “Innocent,” speaks of “a couple bitches got killed.” But in an interview in prison last month, he said he was merely noting the deaths as a narrator, and that other parts of the song recycle lines from another work, a writing approach he often follows.