Police said it happened at about 7:49 p.m. inside the Jimmy John's in the 300-block of Circle Avenue.
According to witnesses inside, the man dropped a gun on the floor and was waving the gun around and said, "Please don't make me do this now."
The man apparently then walked outside the restaurant and stood with the gun in his hand. When officers arrived at the scene, "shots were fired," police said.
The man was placed into custody and rushed to the hospital where he was pronounced dead. Officers did find a gun at the scene.
According to the Cook County Medical Examiner's Office, the man was in his 30s.
It's not clear if any officer was struck by gunfire. The officers involved were taken to the hospital with non-life-threatening injuries.
The shooting will now be investigated by the Illinois State Police Public Integrity Task Force