Eddie James was arrested after officers spotted him making a suspected drug deal in his car in Redgrave Road, Basildon, on 20 October this year.
They searched him under the Misuse of Drugs Act and found £510 in his pocket.
While he was in custody, his mobile phone was continually ringing and receiving text messages relating to drugs.
Officers also searched a flat linked to James in Lincewood Court, Langdon Hills, where they found £21,750 in cash, as well as cocaine, MDMA and a knuckle duster.
They also found paraphernalia used to prepare drugs for sale, as well as high-value jewellery and designer clothes.
Another mobile phone was found, again containing text messages requesting drugs.
A storage lock-up linked to James was also searched.
There they found a large number of luxury shoes, valued at around £6,278, and two stun guns.
James, 29, of Paxfords, Laindon, appeared at Basildon Crown Court on 19 November, where he admitted being concerned in supplying drugs, possession with intent to supply drugs, possession of MDMA, two counts of possession of a prohibited weapon, and possession of criminal property.
He was jailed the same day for four years and four months and a Proceeds of Crime hearing will be heard in due course.
PC Dan Onley, of Op Raptor South, said: “James has not only lost his freedom but also faces losing the earnings he made from his crimes.
“Anyone who thinks drug dealing is an easy way to make money is mistaken.
“You’ll not only be looking over your shoulder because other criminals have their eyes on you.
“We will also be looking out for you.”