Four years ago, when former book editor Daniel Mallory purchased his 550-square foot Chelsea apartment, its main draw was the book storage: floor-to-ceiling shelving, which covers a wall of his living room, plus numerous nooks above doorways and under the flat screen TV that shares space among the shelves. Recently, after receiving 32 hardback copies of his debut novel, “The Woman in the Window,” published under the pseudonym A. J. Finn, Mr. Mallory had to decide which of his collection would be relegated to storage. In the end, the Evelyn Waugh, Graham Greene and Henry James novels got the heave-ho.

“They’re dead,” he said of his early literary idols. “They’re not going to complain.”

Last week, “The Woman in the Window,” a psychological thriller that pays homage to Hitchcock classics, debuted at No. 1 on the New York Times best-seller list. It is a happy if unsurprising endnote to the book’s publishing saga, which began in the fall of 2016, when word got out that the debut thriller at the center of an eight-house bidding war was written by an anonymous book editor. Probably because of the gender-neutral pseudonym and the book’s winning, wine-slugging unreliable narrator, Anna Fox, guesses about the author’s identity skewed female.

The competition for North American rights ended with a $2 million, two-book winning offer from Mr. Mallory’s own publishing house, William Morrow, plus deals with a record-breaking 37 international publishers and a film deal with Fox 2000.

“As a publishing industry veteran, I could appreciate, even at this very early stage, how unusual this sort of attention was,” Mr. Mallory said.