The world should really be going more Palantir’s way right now.

The company made its name with data-mining software tools used by the military and others involved in national security—an image Palantir leans into hard.

Chief Executive Officer Alex Karp brought up the threat of nuclear war twice in the company’s latest quarterly call Monday morning. “We have built a company for the world that is, not the world that ought to be,” Mr. Karp said on the call. “And it is instability, not its absence, that makes our software all the more essential.”

Even a world reeling from Russia’s invasion of Ukraine didn’t seem to get that memo. Palantir’s first-quarter revenue grew 31% year over year to about $470 million, exceeding the company’s own forecast by less than 1%—its smallest beat on record. Palantir also projected a record-low revenue growth rate of 25% year over year for the current quarter, which also is short of Wall Street’s forecasts for 29% growth.

Palantir’s shares slid 22% Monday following the results, bringing the stock’s loss for the year to 59%.

Palantir is hardly the first software company to come under the market’s harsh glare recently. The S&P 500 Software & Services Group has shed 23% so far this year while the BVP Nasdaq Emerging Cloud Index is down a whopping 44%. Palantir’s heavy government exposure—56% of trailing 12-month revenue—provides a hedge against the less predictable corporate market.

But government contractors aren’t typically valued at the 57 times forward earnings that Palantir averaged over the last three months before Monday’s slide. And the company’s commercial side includes revenue from companies in which Palantir also has invested—a practice some have questioned. Such “commercial contracts” totaled $39 million in the latest quarter.

Palantir said Monday that sum will represent the peak of revenue from that program, which it has since decided to wind down. The company also maintained its forecast for 30% or greater revenue growth for the full year—meaning that business will need to pick up in the second half. But with the stock now below even the opening price of its first trading day following its direct listing in late 2020, Palantir might also need to dig deep to keep its talent happy.

The company’s stock-based compensation totaled 50% of revenue in 2021—the third highest in a group of 55 software stocks tracked by Citigroup.

A restive workforce would make Palantir’s world very unstable.

Write to Dan Gallagher at dan.gallagher@wsj.com