Jakub Glowacz, 31, was arrested when officers used a search warrant to enter the terraced property on Warwick Street in the Agbrigg area of the city in March.
The officers found a cannabis farm, along with 4kg of amphetamine and 4kg of cutting agents.
They also seized hundreds of ecstasy and cathinone tablets, along with a sword, a zombie knife and an imitation gun.
The site was being used to not only grow the cannabis, but for packaging and distributing the drugs.
Glowacz, of Linton Road, Wakefield, was apprehended after trying to flee the property when officers arrived at the Warwick Street address. He was subsequently charged and remanded in custody.
He admitted four counts of possession with intent to supply and the production of controlled drugs during a hearing at Leeds Crown Court.
The raid on the property was carried out by Wakefield's Neighbourhood Impact Team, which was established in October as the enforcement arm of Project Adder - a Home Office initiative aimed at tackling drugs in communities.
So far, the team has seized controlled drugs worth approximately £2.2m.
A spokesman said: "The sentencing of Jakub Glowacz sends a positive message that such offending will not be tolerated and the team are dedicated to ensuring that those who are involved in his network, and other criminal networks are brought to justice.
"Illegal drugs are a blight to communities and impact the most vulnerable in society. The Neighbourhood Impact Team will continue to make Wakefield a safer place."
This article was first published by the Wakefield Express.