"Our special forces stormed the hijacked Samho Jewelry earlier today and freed all hostages," said Colonel Lee Bung-Woo, a spokesman for the Joint Chiefs of Staff.
The South Korean captain suffered a gunshot wound to his stomach during the raid but his condition is not life-threatening.
The chemical freighter was seized on 15 January in the Arabian Sea when it was en route to Sri Lanka from the United Arab Emirates. The crew comprised eight South Koreans, two Indonesians and 11 Burmese sailors.
South Korean forces and the pirates exchanged fire on Tuesday. The pirates had apparently left the Samho Jewelry to try to seize a nearby Mongolian vessel. South Korean commandos aboard a speedboat and a Lynx helicopter were dispatched to rescue the Mongolian ship.
Tuesday's gunbattle left several pirates missing and believed killed although their bodies have not been found, officials said. Three commandos were slightly injured.
Pirates hijacked the Syrian ship Khaled Muhieddine K with 25 sailors on board in the north Arabian Sea as it headed towards Yemen, the European Union's naval mission said late Thursday.