SEOUL—South Korea’s declining birthrate has become a national-security challenge: Fewer young men are around for military service.

That is why Seoul officials said Wednesday that South Korea’s active military will shrink to half a million personnel by 2022, from the current total of about 600,000.

South Korea, one of a few countries with ongoing national-service conscription, has the lowest fertility rate among developed countries. Women are giving birth to fewer than one child on average, according to South Korean government estimates, far below the 2.1 newborns necessary to keep population steady.

The military service, which lasts between 18 to 22 months, is viewed as a rite of passage for South Korean men. But the pool of able-bodied draftees is projected to shrink by nearly half over the next two decades, according to South Korea’s defense ministry.

The reduced numbers test a South Korean military that provides the first line of defense against a potential North Korean attack. Home to the largest overseas U.S. military base, South Korea for decades has provided ample foot soldiers intended to cooperate with American air and naval forces. North Korea’s military is an estimated 1.2 million.

To meet its staffing challenge, the South Korean military plans to use surveillance drones, satellites and unmanned combat aircraft, as well as increasing the number of women serving. The Seoul government also plans to reduce the number of national service conscripts staffing local police and fire departments and serving at government facilities or research institutes.

The reductions could compromise South Korea’s defense readiness at a time when the regime of North Korean leader Kim Jong Un has conducted a series of short-range weapons tests this year that threaten Seoul, military and security experts say. During the recent diplomacy with Pyongyang, both Seoul and Washington have agreed to cancel or pare back joint military exercises.

“This is a disturbing situation for the military,” said Chun In-bum, a retired lieutenant general and former special forces commander of the South Korean army.

South Korean troops on the border with North Korea. The reduction in military size comes at a time when North Korea has conducted a series of short-range missile tests. Photo: shin won-gun/Agence France-Presse/Getty Images

Experts point to other potential areas of concern. The length of military service was shortened last year by three months, implementing a campaign promise made by South Korean President Moon Jae-in. And since April, South Korean soldiers have been able to use mobile phones inside the barracks.

Those factors are just as troubling for troop readiness as the dwindling population, said Lee Sang-ho, a professor at South Korea’s Daejeon University, who has advised the South Korean military. “The military is spoiled,” Mr. Lee said.

Seoul’s defense ministry declined to comment.

“We will reform the structure of the military force to be centered around science and technology,” South Korea’s government said in a Wednesday news release.

South Korea, Asia’s fourth-largest economy, has a rapidly aging population due to the low birthrate. The government expects the population to peak in the next decade at 52 million before dropping to 39 million by 2067.

Young South Koreans face a highly competitive job market, which has led many to delay marriage and children. The country’s youth unemployment rate was 7.3% in September versus the overall rate of 3.1%.

Meanwhile, employed South Koreans are grappling with a grueling work life. The problem is so severe that the government last year capped the workweek at 52 hours.

The Seoul government has invested billions of dollars to encourage couples to get married and have children, offering low-interest loans and government payouts for new parents. But the efforts haven’t worked. In September, South Korea’s finance minister called the shifting demographics a “grave threat.”

South Korea’s birthrate, which peaked at 4.5 in the 1970s, fell below one child per woman last year. That compares to 3.1 in Israel, the highest rate among developed countries, and 1.8 in the U.S., according to the Organization for Economic Cooperation and Development.

South Korea boosted annual military spending by 7% in its latest budget, focusing that money largely on improving its weapons technology. But some experts worry whether more spending on new hardware can compensate for diminished troop count.

“There are things military technology can do, and things only people can do,” said Cheon Seong-whun, a former South Korean National Security Council official.

Write to Timothy W. Martin at timothy.martin@wsj.com

Copyright ©2019 Dow Jones & Company, Inc. All Rights Reserved. 87990cbe856818d5eddac44c7b1cdeb8