The two sides shared their respective concerns over military safety on the seas.
The US Indo-Pacific Command said in a statement the talks, held on Wednesday and Thursday in Shanghai, were focused on "decreasing the incidences of unsafe and unprofessional" actions by China's naval and air forces.
The Chinese defence ministry pointed out that US military ships and aircraft have been conducting "reconnaissance, surveys and high-intensity drills in the sea and air spaces around China, which are prone to cause misunderstandings and miscalculations and jeopardise China's sovereignty and military security".
China told the US that it would continue to "respond to all dangerous, provocative actions" and "resolutely safeguard national territorial sovereignty and maritime rights and interests," the ministry statement said.
The talks were held in the same week Beijing conducted large-scale drills in the waters and airspace around the island of Taiwan.
The meeting also came shortly after US Defence Secretary Pete Hegseth told his Japanese counterpart that Japan is "our indispensable partner in deterring Communist Chinese military aggression".
Ties between Beijing and Washington have been strained in the past several years over issues such as trade, cybersecurity, Taiwan and the South China Sea.
Under Trump, a trade war has worsened as his administration imposed tariffs and China announced retaliatory measures.
To push back at China's aggression in the Indo-Pacific, the US has stepped up its presence in the region, sailing through the Taiwan Strait and conducting drills in the disputed South China Sea.
The US opposes any forced takeover of Taiwan, which Beijing claims to be part of Chinese territory and vows to take by force if necessary.
But both governments are also seeking to keep the lines of communication open, including through the semi-annual talks of the working group.
The Chinese defence ministry said the two sides "conducted candid and constructive exchanges on the security situation in maritime and aerial domains" and that they discussed measures to improve maritime military security between the two countries.