Assailants in a car gunned down General Khaled Kamal Osman during an inspection of a police unit in the North Sinai provincial capital El-Arish late yesterday, the interior ministry said.
The gunmen fled after the police retaliated, it said in a statement. Egypt's branch of the Islamic State group, which calls itself Sinai Province, said on Twitter that it had carried out the attack.
Egyptian security forces have struggled to suppress an insurgency in the peninsula since the military overthrew Islamist president Mohamed Morsi in 2013.
The jihadists say their campaign is in response to a crackdown by the authorities since Morsi's ouster that has left at least 1,400 people dead and thousands jailed.
The military last week launched a major campaign to root out militants in the Sinai and says it has killed more than 200 jihadists - a toll that it was not possible to verify.