Enrique Hernandez was killed by gunfire coming from "a vehicle in movement" in the center of the town of Yurecuaro, where he was seeking higher office, the state prosecutor's office said in a statement.
Three other people, including his wife, were wounded in the shooting in the town of 30,000 people.
Hernandez was a candidate for Morena, the new leftist party of two-time presidential candidate Andres Manuel Lopez Obrador.
He was also a former leader of vigilante groups formed by farmers in Michoacan in 2013 to combat the Knights Templar drug cartel, which had terrorized the state through murder, kidnappings and extortion.
Last year, Hernandez was detained in connection with the murder of the mayor of Tanhuato, but he was later released due to lack of evidence.
"He was a person who worried for his people due to organized crime and he decided to take up arms," fellow vigilante leader Estanislao Beltran told AFP.
Morena's candidate for governor, Maria de la Luz Nunez Ramos, said Hernandez's killers were wearing masks.
"This act is deplorable and we demand that the authorities find those responsible," she said.
The June 7 vote is the first electoral test of President Enrique Pena Nieto's administration, almost half way through his six-year term.
Security is a concern in Michoacan and the neighboring state of Guerrero, which has been hit by drug gang violence and social tensions in recent months. The western state of Jalisco has also endured cartel violence this year.
In March, also in Guerrero, a woman candidate in the town of Ahuacuotzingo, Aide Nava, was kidnapped and later found dead. Her husband, the town's former mayor, was killed months earlier.
Mexicans will vote for 500 new members of the lower chamber of Congress as well as governors in nine of 32 states and nearly 900 mayors.
Michoacan's persistent troubles
Michoacan Governor Salvador Jara Guerrero said Hernandez's killing "marks the first flashpoint" of the election and that the security cabinet would meet on Friday.
"We hope that this won't have a bigger impact" on the elections, he told Milenio television.
Other politicians condemned the killing, saying it shows Michoacan remains violent despite the federal government's deployment of extra police and troops.
"This acts confirms that in Michoacan the issue of violence is still relevant. The security strategy is a total failure," said Daniel Moncada, state leader of the leftist Movimiento Ciudadano party.
Silvano Aureoles Conejo, the gubernatorial candidate for a coalition of the leftwing PRD, PT and PANAL parties, said: "We are jointly calling to build peace, tranquility, stability and harmony, and this stains the electoral process."
"The authorities must act immediately," he said. "The motives for this assault against hte Morena candidate must be cleared up."