Eminem is furious over his ex-wife Kim’s latest run-in with the law and wants to end their explosive relationship for good, a close friend says.

The rapper flew into a rage after cops found two bags of a white, powdery substance believed to be cocaine in Kim’s car during a traffic stop June 10 outside Detroit, Mich., the family friend told The ENQUIRER.

The material was taken to the Michigan State Police crime lab for analysis. “If it is found to be cocaine, the information will be turned over to the Macomb County prosecutor’s office for the issuance of an arrest warrant,” St. Clair Shores Police Lieutenant Bob Sass told The ENQUIRER.

Eminem — real name Marshall Mathers III — divorced Kim in 2001, but the two later reconciled. Kim, 28, and the couple’s 7-year-old daughter Hailie now live with the singer at his mansion near Detroit.

“Marshall loves Hailie so much, he would do anything for her, and that’s why he got back together with Kim,” the family friend said. “They were going to remarry, but they recently had another big blowout and he decided not to go through with it.

“Now, after this latest escapade, Marsh wants Kim out of his life for good, and he’s decided to ask for full custody of Hailie. He said, ‘Kim is over.’ “

Kim previously had been arrested on a drunk-driving charge and was busted on a cocaine-possession charge in July 2001. She was charged with driving with a suspended license after the June 10 traffic stop that triggered the latest drug investigation.

“Kim makes Marshall’s life a living hell,” the family friend said.

Eminem, 30, is currently touring Germany, the Netherlands, France, the United Kingdom and Ireland, and he was in Europe at the time of Kim’s arrest.

“He is sick of Kim’s antics,” the insider said, “and hates having to answer to her for what he says and does with Hailie.”

In June 2000, Eminem caught Kim kissing another man and threatened them with a gun. He was given two years’ probation for assault and carrying a concealed weapon. “Marshall has completed his probation and considers himself a free man again,” his friend said. “That’s why he will seek full custody of Hailie and feels he can win.”