Deputy Mayor Everett Gillison identified the inspector as Ronald Wagenhoffer. Gillison says the department is in mourning and Wagenhoffer "did nothing wrong." Wagenhoffer leaves behind a wife and son.
Police say the 52-year-old inspector shot himself inside his pickup truck Wednesday night.
According to police, the inspector surveyed the building less than a month before it collapsed June 5 onto a neighboring thrift store, killing six people and injuring at least 14.
Investigators say a heavy equipment operator with a lengthy rap sheet was high on marijuana when the building, which was under demolition, collapsed. The operator, Sean Benschop, faces six counts of involuntary manslaughter, 13 counts of recklessly endangering another person and one count of risking a catastrophe. His attorney has said he was being made a scapegoat.
A grand jury is investigating the collapse.
The Associated Press contributed to this report.