Huai was born in Harbin but traces his ancestry to Jinan, Shandong province. He graduated from Jilin University of Industry (now merged into Jilin University) in 1984. He joined the Chinese Communist Party in January 1986, and began work in September 1987 after obtaining a computer science master's degree at the Harbin Institute of Technology. In November 1993, he earned a doctorate from Beihang University. He also attended Columbia University as a visiting scholar between 1995 and 1996.[2][3] In December 2000, he was named deputy party chief and vice president of Beihang University. In May 2009, he was promoted to president of the university, obtaining vice-minister level rank and was elected as a member of the Chinese Academy of Sciences.[4] In 2012, he was awarded the Legion of Honour by the French government for his outstanding contributions to education, science and technology development across China and France.[5]
In February 2015, Huai was named Deputy Minister of Information Technology. In December 2016, Huai was named deputy party chief of Tianjin. In September 2017, Huai was transferred to become party secretary of the China Association for Science and Technology (CAST).[6]