Alejandro Aparicio Santiago was assassinated by a group of gunmen as he headed to the city hall in Tlaxiaco, Oaxaca.
He was taken to hospital, where he later died.
Oaxaca’s governor, Alejandro Murat, said he “strongly condemned” the attack.
In a tweet after the shooting, he said a suspect was already being held in custody over the killing.
“I requested a thorough investigation from the attorney General and he informs me that he has already arrested the probable perpetrator,” he said.
“I express my condolences to the family and the people of Tlaxiaco.”
According to the state prosecutor’s office, a drugs gang is suspected of being behind the attack, which injured four other people, including a politician in the party of President Andrés Manuel López Obrador.
President Obrador has campaigned to restore order to the country by ending corruption and the drug wars in Mexico.
Between September 2017 and August 2018, 175 politicians were murdered in Mexico, according to security consultancy firm Etellekt.
Register for free to continue reading
Registration is a free and easy way to support our truly independent journalism
By registering, you will also enjoy limited access to Premium articles, exclusive newsletters, commenting, and virtual events with our leading journalists
Already have an account? sign in