Patrons began to scatter, and the women who had been smiling at him just seconds earlier stared, a look of open-mouthed shock on their faces.
The incident, which occurred at 12.45 am local time at the weekend, was captured in a 32-second video obtained by ABC affiliate KMGH.
The man was an off-duty FBI agent, according to the Denver Police Department, which did not identify him.
He accidentally fired his gun as he was picking it up from the floor, striking another bar patron in the lower leg, police said.
That patron was taken to a hospital and is in good condition.
Denver police spokesman Marika Putnam said she does not know what type of gun the agent was carrying.
The police department's homicide unit is investigating the incident, and the Denver district attorney's office will decide on criminal charges, if any.
Special Agent Amy Sanders, spokeswoman for the FBI's Denver field office, said the agency cannot provide details, citing personnel matters.