DAVOS, Switzerland—Chinese President Xi Jinping’s strong defense of globalization at a speech at the World Economic Forum was depicted here as an effort to fill a vacuum being created by the U.S. stepping back from a global leadership role.

Mr. Xi was seen as reacting to growing concerns that the incoming U.S. administration of Donald Trump would shift the world’s largest economy toward protectionism.

In...