About 2:30 a.m. Friday, an unidentified 34-year-old and his ex-wife left Le Girls Cabaret West, near Interstate 17 and McDowell Road.
As the man was escorting his ex-wife to her vehicle, police say Gabriel Rayos approached them and shot the man multiple times.
Rayos attempted to run to his vehicle and flee, but police say another man confronted him and struggled for Rayos' gun.
They both fell out of the vehicle, and bystanders helped detain Rayos until police arrived.
The man who was shot died at a nearby hospital, while the man who tried to wrestle away Rayos' gun suffered minor injuries.
Police say the name of the man killed will be released once his family is notified, and Rayos is in the process of getting booked on one count of first-degree murder.
A call to the Phoenix Police Department for further details was not immediately returned.