At the time, Mr. Talese decided not to write about Mr. Foos, partly because he demanded anonymity. But Mr. Talese didn’t turn him in for his unethical and illegal behavior, either, even after Mr. Foos confessed that he had witnessed a murder. The two stayed in touch until, in 2013, Mr. Foos gave him permission to use not only his journals but also his name. He was approaching 80 and felt that the statute of limitations would protect him from lawsuits.

“The Voyeur’s Motel” has come under ethical criticism since an excerpt was published in The New Yorker. It has also been criticized for fact-checking lapses. The Washington Post reported last week that, among other things, Mr. Foos did not own the motel for eight of the years (1980-88) he was said to have been gawking. Confronted with this fact, Mr. Talese briefly disowned his book before changing his mind.

He is right to stand by his book. Mr. Talese makes it abundantly clear in “The Voyeur’s Motel” that Mr. Foos is not an entirely reliable narrator. Most of what it describes happened before 1980. Indeed, Mr. Talese finds his own inconsistencies in his story. “I cannot vouch for every detail that he recounts in his manuscript,” he writes. The reader moves forward with this in mind, while having little doubt that much of what Mr. Foos recounts actually happened. Future editions of the book can address some errors and omissions.

I’m not altogether certain I can make an airtight ethical case for Mr. Talese’s journalism in “The Voyeur’s Motel,” at least not in the space remaining in this column, but I can make a literary one. This book flipped nearly all of my switches as a reader. It’s a strange, melancholy, morally complex, grainy, often appalling and sometimes bleakly funny book, one that casts a spell not dissimilar to that cast by Janet Malcolm’s “The Journalist and the Murderer” (1990), another slim volume about the uneasy fandango that nonfiction writers and their subjects perform.

On paper, Mr. Talese is not the darkly provocative intellectual that Ms. Malcolm is, nor does he try to be. (You can imagine her book about this one, as you are reading.) Yet one reason “The Voyeur’s Motel” is gripping is that Mr. Talese doesn’t fletcherize his material. He lays out what he knows and does not know in sentences that are as crisp as good Windsor knots. He expresses his qualms, but trusts the reader to come to his or her own conclusions.

Nor does he demonize Mr. Foos. It’s plain that he is a sick man. He follows some of his subjects home to get a sense of their outside lives. But he is also a sensitive and tragic one. He becomes bitter about the Vietnam War while watching crippled veterans try and sometimes fail to have sex with their wives. His well-written journals are filled with admiration for lesbians, whom he calls “the only couples who seem to enjoy pleasing one another in bed.”

Mr. Foos defends his voyeurism by saying that no one was hurt or exposed. Like Mr. Buford, he is a seeker after his own species, but one who took things vastly too far.

You will often feel shabby while reading “The Voyeur’s Motel.” You are meant to. It’s an intense book that reminds us that a problem of being alive is seeing things you hate but are attracted to anyway. It’s possible to admire it while wanting to pluck out your own prying eyes.