The meeting ended about 40 minutes ahead of schedule. Neither delegation spoke to reporters before U.S. Trade Representative Robert Lighthizer and Treasury Secretary Steven Mnuchin left for the airport.
Economists had said quick breakthroughs were unlikely because the two governments face the same disagreements over China's technology policy and trade surplus that caused talks to break down in May. Trump and President Xi Jinping agreed in June to resume negotiations but neither has given any sign of offering big concessions.
The dispute over U.S. complaints that Beijing steals or pressures companies to hand over technology has battered exporters on both sides and disrupted trade in goods from soybeans to medical equipment. Trump has raised tariffs on $250 billion worth of Chinese imports while Beijing responded by taxing $110 billion of U.S. products.
Chinese leaders are resisting U.S. pressure to roll back plans for government-led development of industry leaders in robotics, artificial intelligence and other technologies. Washington complains those efforts depend on stealing or pressuring foreign companies to hand over technology.
For their part, American negotiators are reluctant to cede to Chinese demands that punitive U.S. tariffs be lifted immediately. Trump wants to keep some penalties in place to ensure Beijing carries out any agreement.
Rhetoric on both sides has hardened, prompting suggestions U.S. and Chinese leaders are settling in for a "war of attrition."
"China would love to wait and just hope," Trump told reporters Tuesday.
"They'll pray that Trump loses," he said. "And then they'll make a deal with a stiff, somebody that doesn't know what they're doing."
Separately on Twitter, Trump warned that if he wins in 2020, "the deal that they get will be much tougher than what we are negotiating now ... or no deal at all."
Trump's "aggressively tinged" remarks were a "stark reminder to investors that the U.S. and China are no closer to an agreement and, in fact, might be drifting farther apart," said Stephen Innes of VM Markets in a report.
Negotiators in Shanghai are also expected to discuss the fate of telecom equipment giant Huawei Technologies Ltd. Washington put the company, China's first global tech brand, on a security list in May that blocks purchases of U.S. components and technology.
The United States says Huawei is a national security threat, an accusation the company denies. Trump has said it could be a bargaining chip in the trade dispute.
McDonald reported from Beijing.