The four ships - guided missile destroyer INS Rana, stealth frigate INS Shivalik, missile corvette INS Karmukh and fleet tanker INS Shakti - had docked in Shanghai last week.
The Indian warships were visiting China after a gap of six years. The port call at Shanghai was part of Indian Navy's long haul deployments on its eastern seaboard, when its ships from the Visakhapatnam-based Eastern Naval Command sail for two months up to western Pacific Ocean, visiting several southeast Asian and east Asian nations along the route.
The Indian warships sailed out of Shanghai on Sunday and they are well on their way back to India, an Indian Navy officer said here.
The warships, under the command of the Eastern Fleet Flag Officer Commanding Rear Admiral P Ajit Kumar, and its crew members had the opportunity to interact with the Chinese People's Liberation Army (Navy) personnel during their docking in Shanghai.
The visit by Indian ships to China signals a keen desire on part of the two rising Asian powers to build greater trust in the maritime domain, which is widely seen as a potential source of friction amid China's assertiveness in South China Sea.
On the occasion, India's Eastern Naval Commander, Vice Admiral Anil Chopra was in Shanghai when the Indian and Chinese navies also held their first maritime dialogue, aimed at greater cooperation in combating piracy and cooperation in seabed research.
The warships had covered South China Sea too that has witnessed naval flare-ups in the recent months over conflicting territorial claims of nations in the region.
During the return voyage, expected to take about a month, the warships will also call on ports in several South East Asian nations before reaching Visakhapatnam.