Play video content EXCLUSIVE

Katt Williams drew a gun on someone at the Comedy Store in West Hollywood Tuesday night ... triggering a 911 emergency that ended with deputies racing to the scene with guns drawn.

Eyewitnesses tell TMZ ... Katt was inside the club when a heckler started talking smack about the comedian's height and race. We're told Katt was not on stage ... he was milling around. An eyewitness says he went crazy, threatening the heckler with a gun.

At that point someone called 911 -- reporting a man with a gun at the Comedy Store -- and 6 cop cars raced to the Sunset Strip. Deputies pointed shot guns and bean bag guns at the club as they prepared for a confrontation.

Turns out ... Katt had already left.

So far no arrest warrant has been issued for Katt. Cops tell us they're still investigating.

Check the video ... Katt had some interesting things to say this past weekend ... after the GPen punk rock show in L.A.