A South Korean warship sailed close to disputed islands in the South China Sea this month, entering what Beijing sees as its territorial waters without its permission, in a maneuver that piqued Chinese officials.

The South Korean navy destroyer Munmu the Great was taking refuge from a typhoon and not conducting a “freedom-of-navigation” operation challenging maritime claims, a South Korean government official said. The ship, returning from antipiracy operations off the coast of Somalia, didn’t have time to seek permission,...