The security chief in the east Libyan city of Benghazi was assassinated late on Tuesday, a security official told AFP.
Unknown people opened fire from a car at Fraj al-Dersi in front of his home. He was hit by three bullets and died shortly after being taken to Benghazi medical centre, the official said, asking not to be named.
Dersi was appointed shortly after an attack on the US consulate on September 11 which cost the lives of US ambassador to Libya Chris Stevens and three other Americans.
He had occupied leading posts under the regime of Moamer Kadhafi, including anti-drugs chief, before joining the revolt against the former dictator when it started in February 2011.
Several recent assassinations in eastern Libya, mostly of police or army officers who served under Kadhafi, have been attributed to radical Islamists.