The navy struck as the pirates prepared to attack a Greek-flagged merchant ship, said Capt. M. Nambiar, a navy spokesman.
The pirates fired at the two approaching Indian navy and coast guard ships, but later displayed white flags and surrendered about 100 miles (160 kilometers) west of the Lakshwadeep islands, Nambiar said.
The navy rescued 24 crew members from the Prantalay-11, which the pirates had seized and were using as a mother vessel at various locations in the Arabian Sea, he said.
The vessel was captured in Sunday's operation and the pirates were being taken to Mumbai for questioning, he said.
It was the second anti-piracy operation by the Indian navy in the region in less than two weeks.
On Jan. 28, the Indian navy intercepted another Thai fishing boat, the Prantalay, which had been used by Somali pirates as a mother vessel since April last year.
The navy arrested 15 pirates after an exchange of gunfire. It rescued 20 fishermen from Thailand and Myanmar who were the original crew of the fishing vessel and were being held hostage.
The Press Trust of India news agency said the vessels seized in the past two weeks were part of the Prantalay family of ships, several of which have been hijacked by pirates in the past six months.
The Gulf of Aden, which connects the Red Sea to the Indian Ocean, is one of the world's busiest shipping lanes and is a prime target for Somali pirates.
Indian warships have been escorting merchant ships as part of anti-piracy surveillance in the area since 2008.
That year, India's navy drew criticism for sinking a Thai fishing trawler that had been commandeered hours earlier by pirates. The navy defended its action, saying it had fired in self-defense.