For much of the past two decades, Qi Lu, a search-technology whiz, waged losing battles against Google, first at Yahoo Inc. and then at Microsoft Corp.’s Bing.

Four months ago, he relocated to his native China to take on a challenge that some in the tech world think is just as quixotic: reviving Baidu Inc. The company’s core search-engine business once made it the Google of China, but it has been beset by bad decisions, scandals and falling profits, leaving its future uncertain.

Mr....