A black New Jersey cop facing a possible life sentence for the racially charged road-rage slaying of a white driver told The Post in his first extensive interview that he was protecting his family and, “I know the law is on my side.’’

Joseph Walker, 40, an 18-year veteran assigned to the Hudson County Prosecutor’s Office, fatally shot Joseph Harvey, 36, during a confrontation on June 8 on I-97, just south of Baltimore.

Walker, of Eastampton, NJ, was driving a Kia minivan carrying wife Marie and their three young kids. Harvey was in a green Honda Accord carrying one person.

Walker cut Harvey off when both vehicles tried to make a left turn at the same place.

The two drivers exchanged angry words as their cars swerved around each other on the shoulder of the road.

Both eventually came to a halt, and Harvey, an unmarried truck driver, allegedly shouted racial epithets as he approached the officer’s van.

Walker fired several shots from six to 12 feet away at Harvey, who was unarmed.

Walker was charged with murder and is free on $1 million bail. He was suspended from his job without pay.

The charge has had a profound effect on his life.

“Emotionally, it rocked me,’’ he said. “I’ve spent my life trying to protect and serve. I can’t describe how emotionally devastating it’s been.

“I am a dedicated law-enforcement professional, someone who, when I come home from work, takes off his tie and roughhouses with his son and plays with dolls and has tea parties with his daughters.

“I help my 10-year-old daughter with her homework, then I sit down and watch television with my wife.”

Walker’s lawyers say there’s evidence Harvey had downed several alcoholic beverages prior to the clash and had been spewing racial slurs.

“He certainly had been drinking prior to the incident,” said one lawyer, Anthony Pope.

“He also used the N-word. This was confirmed by witnesses,’’ including Harvey’s passenger, Adam Pidel.

Another of Walker’s attorneys, Patrick McAndrew, told The Washington Post that Harvey was out of control.

“He [Harvey] was enraged, screaming at the [Walker] family in their van. His wife was in the passenger seat, she could distinctly hear [the slurs]. There were threats of violence; they were on notice,” he said.

No trial date has been set, but Walker, who claims self-defense, said, “I look forward to my day in court and clearing my name and obtaining justice.”

The office of the Maryland prosecutor that brought the case declined comment.

A friend of Harvey’s, Jennie Jones, who had known him since he was a child, told Baltimore TV station WJZ that she’ll be in court for the trial.

Jones, who said she heard Harvey was shot as he was falling, added she’s praying that her friend “gets justice.”