An old-school rap battle broke out at a Long Island library, when the director used lyrics from a classic track to diss an underling who refused to discriminate against white people, according to a new lawsuit.

Diane Woodcheke, 46, says her boss, Joy Rankin, at the Riverhead Free Library pointedly quoted the 1984 rap track “Roxanne, Roxanne” by UTFO after Woodcheke protested her edict to hire minorities.

Woodcheke, who is white, said she suspected the words were a taunt because the library atmosphere had grown tense when she told Rankin discrimination was illegal.

Woodcheke — who is not a fan of old-school rap music — first thought Rankin was quoting Sting.

“She kept repeating it, calling me ‘Roxanne, Roxanne,’ ” Woodcheke, 46, said. “At first I thought she was talking about the Police song [“Roxanne”] and was calling me a prostitute or something.

“But I Googled it and found out it was this UTFO group and that she was basically calling me a bitch!”

With “Roxanne, Roxanne,” the Brooklyn group rapped about a “stuck up” woman who rebuffed their advances.

“Roxanne, Roxanne, I want to be your man,” goes the chorus of the song, which caused several rap response songs from various artists in what became known as the “Roxanne Wars.”

Woodcheke says this latest battle in the war led to her firing after she balked at Rankin’s demand that only minorities be hired.

Woodcheke said Rankin — who is African-American — gave the order because “my people have been kept down,” according to the an administrative lawsuit filed with the New York State Division of Human Rights that seeks unspecified damages.

In addition to the rap taunts, Rankin started reducing Woodcheke’s responsibilities and eventually fired her for losing passwords to library accounts, according to the suit.

Rankin did not return a request for comment.

“Discounting people simply because of their race is the very definition of racism,” said Woodcheke’s attorney, Vesselin Mitev.