A Black Lexus was found outside Grosvenor Casino in Grand Junction Road, Brighton on March 20.
Officers had been searching for it after it had been marked as being driven without insurance along Preston Road, Brighton, according to police.
Sitting inside was Shingayi Bayayi, 35, from Bouverie Gardens, Croydon, who admitted he had no insurance or driving licence and no form of identification to prove who he was.
Bayayi, who said he was a carpet cleaner, was arrested on suspicion of driving offences.
The car was seized under the Road Traffic Act for no insurance and to be searched for drugs.
Initially, the officers did not find anything suspicious in the vehicle.
However a large carpet cleaning machine in the boot of the car rattled as it was being removed from vehicle prompting officers to take it apart.
Inside officers discovered a large Foot Locker carrier bag with the hidden stash of cocaine inside the water container section.
Bayayi was charged with the use of a motor vehicle on a road/public place without third party insurance, driving a motor vehicle without a licence and possession with the intent to supply a controlled Class A drug (cocaine).
He appeared before Brighton Magistrates’ Court on Tuesday, April 11 where he entered a not guilty plea.
He then appeared before Guildford Crown Court on August 16, where he changed his plea for the three offences to guilty.
Bayayi was given a six year custodial sentence, receiving a 10 per cent reduction for his early guilty plea.
Detective Constable Shirley White, said: “We did not expect to find the stash of cocaine in the car when it was first spotted outside the casino.
“Searching the vehicle was standard protocol, but as soon as we lifted the cleaning machine out of the car we knew there was something not quite right.
“It was the quick-thinking of the police officers to dismantle the machine that led to us taking a large amount of cocaine off the streets.”