The interiors had peeling plaster walls covered in layers of old wallpaper and paint. A leaky roof and mostly abandoned second-story required immediate attention. In short, the place was a wreck. And yet, "we really just fell in love with it," says Jay McKinney of his Birmingham, Ala., home.

Mr. McKinney, who handles operations for a financial software company, and Chuck Strahan paid about $300,000 to renovate and convert the 19th century tobacco and candy shop into a residential property. The project, however, required some vision—and an acceptance of the building's quirks, says their architect, Mike Gibson of Appleseed Workshop. Instead of covering the damaged plaster, it was polished to highlight its aged patina. And the glass storefront was retained so the street view would be consistent with the downtown surroundings.

"You get all the benefits of the old character, but everything's been updated," says Mr. McKinney, 50. Today, his 2,900-square-foot loft-like living space has an open-plan living room, as well as a roof deck.

Across the country, adventuresome and sometimes deep-pocketed home buyers are converting urban diamonds in the rough into one-of-a-kind residences with both modern conveniences and historic charm. Warehouse conversions are especially popular in space-crunched cities like New York, San Francisco and Chicago, where the available inventory downtown can't meet the demand for city living.

But the conversions come with countless challenges. Office or industrial buildings don't have the same plumbing, window or wall placement as a home. The wide-open layouts and exceedingly high ceilings that often make such spaces appealing can be a difficult to tackle. Then there are the surprises that come up along the way, like lead paint, asbestos tiles or unstable foundations that can make costs hard to predict.