The Shanghai Maritime Court seized the Baosteel Emotion ship, owned by Mitsui OSK Lines, on Saturday.
In a statement published on its microblog, the Supreme Court said the ship's seizure was lifted after the company "fully fulfilled obligations".
The court said Mitsui paid 2.9bn yen ($28mn; £16,680,600) in compensation.
It added that 2.4m yuan ($384,600; £229,100) was paid for court fees.
The company said in a statement that the ship was preparing to leave a Chinese port.
The ship was seized over unpaid compensation for two Chinese ships leased by Daido, a company that was a precursor to Mitsui, in 1936.
The Chinese ships were later used by the Japanese army and sank at sea, Japan's Kyodo news agency said.
The Chinese court ruled in 2007 that Mitsui had to pay compensation. Mitsui appealed against the decision, but it was upheld in 2012.
The seizure came amid severely strained ties between Tokyo and Beijing over historical tensions and a territorial dispute in the East China Sea.
Tokyo lodged a diplomatic protest on Tuesday over the seizure, saying it remained "deeply worried".
Japan has always held that the issue of war-related compensation was settled by a 1972 agreement between the two sides when ties were normalised.
The move comes as US President Barack Obama visits Tokyo on an Asian tour of four allies.
Mr Obama is not going to Beijing, but relations with China are expected to dominate his meetings with regional leaders.