Grammy-winning rapper Jay-Z was arrested last night in connection with the stabbing of a young record exec during a posh party at the Kit Kat Klub in Manhattan.

Witnesses told cops that Jay-Z — whose real name is Shawn Carter — plunged a knife into the back and stomach of Untertainment Records president Lance Rivera on Wednesday, just before midnight.

Several rap-industry insiders said Jay-Z believed Rivera had been distributing bootleg copies of his new Roc-A-Fella/Def Jam album, “Vol. 3 — The Life and Times of S. Carter,” which doesn’t hit stores until Dec. 28.

Jay-Z turned himself in to cops at the Midtown South station house accompanied by his lawyer.

Rivera — who also records under the name of Un — was taken to St. Vincent’s Hospital, where he was treated for multiple stab wounds.

An Untertainment official said Jay-Z was one of several big-name rappers at a party the company threw to promote a new album by rap star Q-Tip.

“Jay-Z walked up to Rivera and said, ‘Lance, you broke my heart,'” one witness told The Post.

“Rivera said, ‘What?'”‘

Then Jay-Z pulled out a knife and stabbed Rivera, the witness said.

Stunned employees of Untertainment Records said the attack came out of the blue.

“We’re very surprised. As far as I knew they were friends. They were both from Brooklyn and were comrades,” said Joi Brown, Untertainment’s publicity director.

Jay-Z and Rivera know each other from the days when both were friends with the Notorious B.I.G., the influential rapper killed in a 1997 drive-by shooting in Los Angeles.

Jay-Z’s lawyer, Harvey Slovis, said his client didn’t stab Rivera.

“He was not involved,” Slovis said last night. “We initiated him turning himself in. He’s a sweet guy. It’s out of his nature to do a thing like this.”

The exact charge against him was not immediately known.

Jay-Z has been furious over the bootlegging of his yet-to-be-released CD, which is selling on the street for $5. The Post easily obtained a copy from a street vendor yesterday.

At a performance party at Irving Plaza a few hours before the Kit Kat Klub bash, Jay-Z whipped up the crowd by asking them to flip the bird in unison to show their distaste for bootleggers.

Jay-Z — who grew up a self-described street thug in the projects of Brooklyn’s Bedford-Stuyvesant — is considered the No. 1 name in rap music.

This year, his album, “Vol. II … Hard Knock Life” went quadruple platinum. He won a Grammy for Best Rap Album and took home a Best Rap Video prize at the MTV Video Awards.

Jay-Z once told an interviewer he took pride in keeping a lower profile than other rappers.

“I ain’t flashy like some of these other niggas, owning three cars, wearing a whole bunch of gold, and showing off. I just did my thing quietly,” he boasted.