Being on top isn’t always what it’s cracked up to be.

Nvidia helped pioneer the use of graphics processors once used mainly for videogaming into powerful chips that now enable artificial intelligence capabilities in data centers. It remade its own business in the process; annual revenue has grown more than five fold since before the data center business began to take off in 2016. Nvidia also became the most valuable semiconductor company in the world, with a market capitalization higher than at least five other chip companies that generate more in annual revenue.

But the past month has wreaked havoc on that position. The company’s pre-announced results for its fiscal second quarter on Aug. 8 and its subsequent report for the period two weeks later both showed the chip maker’s business being hit hard by growing inventory and slipping demand—particularly in its key videogame segment. And Nvidia’s warning last week that it might not be able to sell some of its data center chips in China made the situation even worse.

The stock has now slid 28% since the Aug. 8 pre-announcement, and its loss of 54% for the year to date is the worst on the PHLX Semiconductor Index. Nvidia’s market capitalization is also now second on the index, running about 20% below that of Taiwan Semiconductor Manufacturing.

That creates an interesting setup for Nvidia ahead of what is expected to be a major product launch this fall. A new graphics chip, or GPU, called Hopper is coming along with a central processing unit, or CPU, called Grace. Both are targeted for the data center market, and Grace will be Nvidia’s first CPU entry into that space. The latter has its work cut out for it as it will be challenging established positions by Intel and Advanced Micro Devices in that segment. But the former—Hopper—is expected to be a major component of Nvidia’s data center sales late this year.

Chief Executive Officer Jensen Huang said on the company’s second-quarter call on Aug. 24 that “we expect to ship substantial Hoppers in Q4.” Wall Street expects a little over $4 billion in data center sales in that fiscal period that ends in January.

But its launch had a close call: In a filing after the U.S. market’s close on Aug. 31, Nvidia said Hopper—which it called H100 in the document—is one of two data center chips that now require a license from the U.S. government for any future exports to China and Russia. Nvidia also said the new rules “may impact the Company’s ability to complete its development of H100 in a timely manner.” A filing early the next morning said that Nvidia got the necessary approvals from the government to continue development of the chip, but didn’t change the warning about sales restrictions to China.

Investors weren’t soothed; Nvidia’s stock price opened Thursday with a loss of 6% even after the second filing and had dropped a full 10% by Friday. Nvidia has warned that the sales restrictions could cause a $400 million hit to revenue in the current third fiscal quarter, which is about 7% of its total forecast for the period.

Cowen analyst Matthew Ramsay

had written in a note before Nvidia’s second filing that if development on the Hopper chip was delayed, “the knock-on effects would likely be much larger” than the $400 million Nvidia specified for the current quarter.

Data centers are still expected to be a major growth driver for Nvidia. U.S. tech giants such as Amazon.com, Microsoft and Google are major buyers of the company’s chips to power their cloud-computing services, and Mr. Huang says such customers “are dying” to get their hands on the Hopper chip. But even the cash-rich cloud giants are feeling the pinch of the global economic slowdown and are showing early signs of moderating their spending.

Nvidia’s data center business is projected to average 29% year-over-year revenue growth over the next three fiscal years compared with an average of 62% over the last three, according to FactSet.

Dodging a bullet with its newest chip won’t keep Nvidia from getting wounded by a recession.

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