At least a dozen more were injured, including at least four Americans, according to authorities.
The rampage occurred inside the Blue Parrot nightclub in Playa del Carmen about 2:30 a.m. local time, according to a statement by the attorney general of the Mexican state of Quintana Roo. Playa del Carmen is a popular tourist destination not far from Cancun.
The attorney general said that one person entered the club armed with a gun and two others tried to stop the attack.
Among the dead were four men and a woman, including two people who were part of a security team, authorities said. The woman died from a fall in the incident.
"We can confirm that one U.S. citizen died on January 16 from injuries sustained at the nightclub shooting at The Blue Parrot Night Club," the U.S. State Department said in a statement. "We extend our deepest condolences to family and friends of the U.S. citizen victim.
The American who died in the incident was Alejandra Villanueva, according to her brother, Robert Aaron Martinez.
"She was a hard worker. She was always looking out for my mom and my little brothers," the brother said. "She was working and going to college and pretty much the only one helping my mom."
Two wounded Americans, one from New York and the other from Texas, were treated and discharged from a local hospital.
Officials said the shooting -- on the last night of the 10-day BPM Festival -- was not believed to be a terrorist attack. Three people, who were nearby at the time, were detained by the Public Security Department and authorities were trying to figure out if they were connected to the shooting.
In a statement, the BPM Festival said the violence began outside the club.
"The violence began on 12th street in front of the club and three members of the BPM security team were among those whose lives were lost while trying to protect patrons inside the venue," the statement said.
"We are overcome with grief over this senseless act of violence and we are cooperating fully with local law enforcement and government officials as they continue their investigation."
This is a developing story. Please check back for updates.