The North African oil producer has been in chaos since the 2011 uprising that unseated Muammar Gaddafi, but Misrata, Libya’s biggest port, had been relative peaceful until now.
Gunmen chased the car of Mayor Mohamed Eshtewi after he left Misrata airport following his arrival on a plane from Turkey, a security official said, adding it was unclear who was behind it.
In October, a bomb exploded at the city’s court, killing about four people and wounding 40 others in an attack claimed by Islamic state.
Misrata, almost 200 km (125 miles) east of Tripoli, is the gateway for food and other imports into Libya and the country’s only tax-free zone. It is one of the few places still frequented by foreign business people fearing poor security elsewhere.