He served in the United States Army before earning an undergraduate degree from Yale University and a master's in international relations from George Washington University.
He then joined the Central Intelligence Agency, where he would work for nearly 30 years in a variety of Asian countries prior to becoming a diplomat.
Before being appointed ambassador to China in 1989, he was director of the American Institute in Taiwan, Washington's de facto embassy on the island, and ambassador to South Korea.
After the suppression of the Tiananmen Square protests, Lilley was critical of the Chinese crackdown and harbored a prominent dissident in the embassy, but worked to prevent long-term damage to United States–China relations.
After his retirement, he published a memoir and worked as a fellow at the American Enterprise Institute.