The gun went off as he picked it up after dropping it during his backflip attempt.
The agent, whose identity is not yet known, was filmed dancing enthusiastically while a group of people watched at the Mile High Spirits and Distillery bar.
Video shows them covering their mouths and recoiling as the gun goes off.
The agent retrieves the weapon and walks out of the cleared circle he had been dancing in with his hands held up.
He does not appear to walk in the direction of where the bullet was fired.
Pictures in US media appear to show a man lying on the floor of the bar with paramedics treating his shin or lower knee.
Police in the Colorado city said the gun had fallen from its waistband holster during the incident, which happened early on Saturday morning..
They confirmed a man had been injured and taken to a local hospital in good condition.
US media quoted an FBI spokesperson as saying, “the investigation is active, ongoing, and a personnel matter so we cannot provide comment at this time”.
He did not comment on what firearms protocol is for off-duty agents.
More from US
Donald Trump ‘could pardon himself’ from Robert Mueller’s Russia investigation
Shots fired near San Diego marathon, suspect in custody – police
G7 finance ministers warn US ‘co-operation at risk’ over metal tariffs
Two climbers fall to their deaths from Yosemite’s El Capitan
Teacher charged after ‘feeding puppy to snapping turtle’ in front of students
Signed, sealed, delivered: Trump says summit with Kim Jong Un is back on
Police spokeswoman Marika Putnam said the agent had been taken to a police station and later released to an FBI supervisor.
The Denver district attorney’s office said the incident remained under investigation.