Samuel Straface thought he was the last one out the door one recent evening at the medical-technology startup he leads in suburban Boston.

But as he passed a glass-walled conference room on the second floor, Dr. Straface says he saw a man he didn’t recognize, sitting by himself in front of two open laptops and a tablet device. He continued walking a few steps toward the exit, but then, feeling uneasy, he turned back.

The man was later identified as Dong Liu, a dual citizen of China and Canada. And his after-hours computing at Medrobotics Corp. is at the center of an economic-espionage case brought by U.S. prosecutors.

Mr. Liu is in federal custody, charged with attempting to steal trade secrets and trying to gain unauthorized access to the company’s computer system, prosecutors said. If convicted of both charges, he could face a maximum sentence of 15 years in prison.