Emails stored on former New York City Police Commissioner Raymond Kelly’s official computer were unintentionally deleted at the end of his time in office, city lawyers said this week in court filings in a federal class-action lawsuit.

The city law department said the emails were lost when New York Police Department staff replaced Mr. Kelly’s desktop computer when he left the department in 2013. The city said in court filings the impact was minimal and denied wrongdoing, saying Mr. Kelly made sparing use of email and that much...