Things have a way of working out for writer John Searles. The suspense novelist (whose “Help for the Haunted” was released last week), book reviewer for the “Today” show and editor-at-large for Cosmopolitan magazine had his heart set on buying an apartment with a terrace and a working fireplace. It took six months, but Searles found them both in a condo in the Meatpacking District in 2010.

Then he discovered that he was outbid by someone who offered an all-cash deal. He started looking again. Then, about a month later, he heard that the all-cash offer fell through. Searles immediately put his bid in again — and the home was his.

“I was devastated when I lost it, but my mom kept telling me it would work out and I’d get the apartment,” says Searles. “She was right!”

It’s a duplex, with one bedroom, 1½ bathrooms, a terrace, a working fireplace, skylights and, including the outdoor space, measures 1,300 square feet.

Searles and his boyfriend, theater director Thomas Caruso, moved into the apartment in September, 2010, and set to work on the renovation.

“We redid the floors,” Searles says, “put in bookshelves, renovated the kitchen and the bathrooms and updated the staircase. I carpeted the stairs and added a cherrywood banister over the pine. I also added a ‘secret closet’ at the bottom of the staircase. And I updated the walk-in closet in the bedroom: I added light, built-in dressers, shelves and double racks for hanging clothes.”

He created a dining area by having a custom-made banquette — with storage space hidden in the bottom — built into the wall of the living room and added a small table (with a leaf that opens up) and chairs.

Searles also was pining for a linen closet, but there was none in the apartment. But during renovations, his carpenter discovered there the space to build a 14-inch-wide space to build one.

His much-cherished fireplace is red brick with a brick mantel set into a brick wall. “We have great dinner parties in front of it,” says the author. “The dining room table opens out and we can seat nine or 10 people. So we have good food and a roaring fire. It’s really terrific.”

As for outfitting the apartment, Searles opted to go the vintage route. “I bought Thomas’ desk from someone selling it on the street for $90,” Searles says. “I got the dining room table from a consignment shop in Connecticut for $70 or $80. My desk is from the Prohibition era and it has a hidden, hollowed-out compartment that they used to hide liquor bottles in.”

Even three years later, Searles still can’t believe his good fortune at finding his ideal apartment. “I grew up in a two-bedroom house with my grandfather, my mom and dad and four kids,” he says. “I slept on the couch or on the floor, and I always wanted to have my own space.

“Buying an apartment in New York was beyond my wildest dreams. I had to scrape together every cent to buy it. And I’m so happy I did.”