The U.S. and China have agreed on the broad outline of a deal that would save imperiled Chinese telecom giant ZTE Corp., according to people with knowledge of the matter in both countries, as the two sides move closer to resolving their trade dispute.

The details are still being hammered out, the people said. If completed, the Trump administration would remove the ban on U.S. companies selling components and software to ZTE, a penalty that has threatened to put the company out of business. Instead, ZTE would be forced to make...