According to demand letters, authored by attorney Ariel Mitchell, that were sent to McGregor, the NBA and the Miami Heat this week ... the incident happened just after the Nuggets had won, 108-95, on June 9 at the Kaseya Center in Florida.
McGregor played a big part in the entertainment at the game -- he sat in courtside seats and even participated in a halftime skit where he punched a Heat mascot multiple times while promoting his Tidl Sport recovery spray.
Conor McGregor reminded of himself by knocking out the Miami Heat mascot.
But, according to the letters, obtained by TMZ Sports, at one point later on during the evening ... he "violently" sexually assaulted a woman inside of a men's bathroom.
In the letters, Mitchell claims that NBA and Heat security helped separate the woman from her friend ... and then forced her into a restroom that McGregor and his security guard were already inside of.
In the letters, Mitchell says "security refused to let [the woman] exit or allow anyone else, including her friend, inside the bathroom." The lawyer then claims McGregor emerged from inside of a handicap stall "and shoved his tongue in the victim's mouth and aggressively kissed her."
According to the letters, the woman was able to get McGregor off of her by telling him she had to urinate ... but then McGregor allegedly forced her to have oral sex with him.
McGregor, 34, is then accused of grabbing the woman and pinning her against the wall ... before attempting to sodomize her.
Mitchell says in the letters the woman was able to elbow McGregor repeatedly -- which gave her a window to escape. However, she allegedly fled in such a hurry, she left her purse -- which Mitchell says McGregor's security guards "held hostage" until she pleaded with them for its return.
According to the letters, the woman finally got away from it all ... and went on to report the assault to local authorities on Sunday morning. Mitchell tells us an officer then encouraged the woman to seek out an attorney.
In the letters, which were sent following the woman's meeting with cops, Mitchell said the woman is seeking settlements with the NBA, the Heat, and McGregor in lieu of litigation.
Reps for McGregor, however, said in a statement Thursday morning the "allegations are false."
"Mr. McGregor will not be intimidated," they added.
The Heat released a statement Thursday afternoon saying the org. is aware of the allegations and is "conducting a full investigation" into the matter. The NBA added in a statement of its own, "We are aware of the allegations and are working with the team to gather more information."
The UFC also addressed the alleged incident ... saying it, too, is aware of the claims and is working on getting more information.
"UFC will allow the legal process to play out before making any additional statements."