The late 1970s and early 1980s — when buildings were burning, fiscal crises were raging and the Dead Boys were playing at CBGB — were a macabre time in New York City’s history, a period when it could be said that the city resembled a haunted house.

The photographer John Conn, 62, spent those years documenting the subway system, what was then the dungeon of the city’s haunted house. His images from underground include a bat-wielding man in a hunchback costume, a nun absorbed in a tabloid newspaper with a front-page headline about an attack on the pope and a disembodied arm brandishing a switchblade through an open subway window. The images have a quality of ghoulishness: fear and madness, as if seen through the eyes of a frightened child on a never-ending Halloween night.

“I liked the edge factor,” Mr. Conn said. “Not knowing what kind of trouble I would get in next.”

He claims to have roamed the subways for hours at a time, with no more than a Hasselblad camera and his own blade in his pocket. For nearly a decade, he photographed the graffiti-scarred trains and the denizens of the subway system — capturing everyone from the homeless to shoeshine boys to bathroom attendants at Grand Central Station. Then one day in 1982, as impulsively as it began, his project suddenly stopped.

“I still see images now and then, but I just don’t take them anymore,” Mr. Conn said. “What I did back then, I feel I did it right.”

Follow Lens on Facebook and Twitter.