Until last week, Kelvin Cochran was the chief of the Atlanta fire department, where he oversaw a work force of more than 1,000 firefighters and staff.

Mr. Cochran, a veteran firefighter, is also a deeply religious man, and he was eager to bring his Christian faith into the daily functioning of his department — or, as he put it in a book he authored in 2013, to “cultivate its culture to the glory of God.”

But, as the book revealed, his religious beliefs also include virulent anti-gay views. He was fired on Jan. 6 by Atlanta’s mayor, Kasim Reed, for homophobic language in the book, “Who Told You That You Were Naked?” Among other things, he called homosexuality a “perversion,” compared it to bestiality and pedophilia, and said homosexual acts are “vile, vulgar and inappropriate.”

Mr. Cochran had already been suspended for a month in November for distributing the book to staff members. Following an internal investigation, the mayor did the right thing and dismissed Mr. Cochran for what he called poor judgment: specifically, for failing to get approval for the book’s publication, for commenting publicly on his suspension after being told not to, and for exposing the city to possible discrimination lawsuits.