JINJIANG, China — With a dragnet closing in, engineers at a Taiwanese chip maker holding American secrets did their best to conceal a daring case of corporate espionage.

As the police raided their offices, human resources workers gave the engineers a warning to scramble and get rid of the evidence. USB drives, laptops and documents were handed to a lower-level employee, who hid them in her locker. Then she walked one engineer’s phone out the front door.

What those devices contained was more valuable than gold or jewels: designs from an American company, Micron Technology, for microchips that have helped power the global digital revolution. According to the Taiwanese authorities, the designs were bound for China, where they would help a new, $5.7 billion microchip factory the size of several airplane hangars rumble into production.

China has ambitious plans to overhaul its economy and compete head to head with the United States and other nations in the technology of tomorrow. The heist of the designs two years ago and the raids last year, which were described by Micron in court filings and the police in Taiwan, represent the dark side of that effort — and explain in part why the United States is starting a trade war with China.