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 on Wednesday, the interior ministry said.
The gunmen fled after the police retaliated, it said in a statement.
Egypt's branch of the IS 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 president Mohamed Morsi in 2013.
Read: Emerging threat: US seeks Pakistan’s help to counter IS
Cairo says militants have killed hundreds of Egyptian police and soldiers, many in attacks claimed by IS.
The militants 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 militants -- a toll that it was not possible to verify.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ