MOGADISHU, Somalia—Michael Stock sees things that others don't. "Imagine this," he says one recent afternoon, standing on the sunny second-floor deck of his new oceanside hotel in Somalia's war-battered capital. "There are banana trees where there's desert now, and there's this view."

The banana trees haven't grown in yet, but International Campus, as he calls the complex, is the closest thing to a Ritz for many miles. A fortified compound sprawled across 11 acres of rocky white beach, it offers 212 rooms including $500-a-night villas, several dining rooms, coffee and snack shops, and a curving slate-colored pool where sun-seekers can loll away Somali afternoons.

"It's going to be ridiculous!" Mr. Stock said, just weeks before residents began arriving for April's opening.

A few hours later, the jittery sound of gunfire split the warm February air not far from his new hotel—a reminder that the country is still muddling through a decades-old conflict and that there are still bullets flying, bombs detonating.

Mr. Stock isn't just anyone gambling on a far-fetched idea in a conflict zone. In an unusual twist of the war business, the 36-year-old American is deeply involved in the conflict itself. In addition to being a real estate developer, his company also helps train Somalis in modern military techniques.