The rapper -- whose works included a series of mixtapes with the prophetic title "Hurry Up and Die" -- was driving a Porsche in the early morning in Queens when another motorist opened fire, police said.
Chinx, whose real name was Lionel Pickens, was pronounced dead at a hospital where another passenger was being treated for bullet injuries.
Police did not immediately arrest a suspect or describe a motive.
"Chinx was one of the most talented, professional and determined rappers this industry had to offer," publicist Chanel Rae said in a statement confirming his death.
More From This Section
A remix of the song featured rap giant Sean Combs, best known as Puff Daddy. Chinx collaborated more recently with Young Thug.
"I'm a Coke Boy" was an anthem of sorts to the drug-dealing lifestyle, with the lines:
"Could have been a pilot / Could have been a doctor / Could have been a pimp / Could have been a mobster... Keep wiggling, baby / I'm a motherfucking coke boy."
But he distanced himself slightly as he gained more mainstream recognition, shortening his stage name from the original Chinx Drugz.
Chinx was an acronym he developed in prison standing for Coward-Hearted Individuals Never Exist.
Raised in Queens by his grandmother as his mother struggled with drugs, Chinx said that he turned at an early age to music to express himself.
He was profoundly affected by the 2007 death of his friend Stack Bundles, a rising rapper who was shot in front of his home in Queens while Chinx was in prison.
"You gotta maneuver your way through the same shit to get to the prize," he said.
"I honestly think it's easier to go to the NBA than be a successful rapper.