HONG KONG — In 2014, Baidu announced a hiring coup in the world of artificial intelligence: It had brought in the Stanford and Google alumnus Andrew Ng to lead a new research lab in Silicon Valley.

Just under three years later, Mr. Ng said in a blog post on Tuesday that he was leaving the Chinese search engine company.

His departure is a blow to Baidu, which has been betting big on artificial intelligence, a technology that is expected to undergird a range of others, like voice recognition and driverless cars.

In a post on Facebook and Twitter, Baidu said: “Andrew Ng joined Baidu with a shared goal, to improve life through artificial intelligence. Today, that goal remains strong. Thank you, and all the best on your new chapter!”