The ship left at 4 pm Sri Lanka local time, harbour master Nirmal Silva told reporters in Colombo.
The six-day long visit began on 16 August, with the arrival of the vessel at southern Sri Lankan port of Hambantota.
The ship's next port call is at China's Jiang Yin port, officials said, as quoted by news agency PTI.
The port officials further added that as agreed there was no rotation of personnel during the call. Sri Lanka provided the necessary assistance sought by the Chinese embassy during the ship's visit.
'Ship Visit Is for Replenishment Purposes': Sri Lanka
The ship was originally due to dock at Sri Lanka's Chinese-run Hambantota port on 11 August.
However, after India flagged its concerns, Sri Lanka's defence ministry requested the Chinese embassy in Colombo to delay the ship's arrival.
Later, the Defence Ministry granted security clearance to the vessel for replenishment purposes during the stipulated period, Sri Lanka had said.
The clearance was granted on condition that it will keep the Automatic Identification System (AIS) switched on within the Exclusive Economic Zone (EEZ) of Sri Lanka and no scientific research to be conducted in Sri Lankan waters.
India, however, was concerned about the possibility of the vessel's tracking systems attempting to spy on Indian defence installations while being on its way to the Sri Lankan port.
According to the United States Defence Department, Yuan Wang 5 is under the command of China's People's Liberation Army (PLA) and is capable of tracking satellites and missile launches. However, China's claims that the ship is used for scientific research.
China leased the Hambantota port from Sri Lanka in 2017 for 99 years after Sri Lanka failed to pay debts related to the construction of the facility.
(With inputs from PTI.)