A drug-dealer who scored a six-figure stop-and-frisk settlement against the city ran his mouth all over Staten Island about his windfall — and was shot dead by a robber targeting his riches.

Kenrick Gray — a petty pusher who had 22 drug ­arrests — was gunned down Tuesday, two years after getting $132,500 for being wrongly stopped by a racist cop.

“Mr. Gray recently made known throughout the neighborhood that he received the windfall and that very foolish boast did cost him his life,” a source said. “Apparently, the assailant caught wind of that and tried to rob him. There was a struggle and he was shot.”

Gray was targeted by robber Darren Brown on Park Hill Avenue in Stapleton, the source said.

Brown, 27, also shot Gray’s pal, Noland Whistleton, 41, in the leg and torso during the botched robbery. He later died, cops said.

It wasn’t clear how much money Gray was carrying when he was gunned down or whether the suspect made off with any cash.

The Staten Island Warrants Unit collared Brown Wednesday hiding in the shower of his girlfriend’s home, sources said.

Gray landed his stop-and-frisk loot after being stopped by NYPD Officer Michael Daragjati , who was seen on surveillance after the bust bragging that he had “fried another n—-r.”

Daragjati is serving a 57-month sentence for violating Gray’s rights and for an unrelated extortion case.

The rogue officer — who had several other civil-rights complaints against him — had to cough up $7,500 of his own cash to Gray to resolve the case.

“The settlement was a well-deserved one, and not merely enough for the pain and suffering that Kenrick and his family endured by the system,” his sister Danielle C. Milli told the Staten Island Advance. “And now his life was taken. When does this stop?”

Milli said Gray was a father of two daughters and a poet and self-published author who wrote of witnessing his mother’s murder.

“It’s a fool’s thought who thinks his world will change once he becomes rich,.” he wrote in a poem, “The Thoughts Thunk with Idle Time.”

A source said Gray had also talked of using his stash to launch a music business but that the plan never materialized.

“Word gets around about that type of thing,” said a ­female relative by phone. “People knew he had a little money and he just wasn’t as quiet about it as he should have been . . . it’s just sad.”

Gray’s attorney, Brett Klein, did not return a call for comment on the slaying.