BEIJING — As the leader of the world’s most populous country and biggest communist party, China’s president, Xi Jinping, has plenty to worry about, and a new book sheds light on what probably keeps him up at night.

The recently released 272-page book of Mr. Xi’s remarks on “national security” includes previously unreleased comments that give a starker view of the president’s motivations than found in most Communist Party propaganda. Here is a selection.

Winning the Technology Race

The recent trade dispute between China and the United States has brought new attention to China’s zeal to become technologically self-reliant. The book shows that Mr. Xi was determined that China master its own microchips, operating systems and other core technologies well before this recent quarrel. In two speeches — in July and August 2013 — Mr. Xi pointedly said that Western domination came thanks to technology.

“Advanced technology is the sharp weapon of the modern state. An important reason that Western countries were able to hold sway over the world in modern times was that they held the advanced technology. You cannot buy the truly core technologies. It’s been aptly put that ‘The sharpest weapon of a state should not be revealed.’” “Our technology still generally lags that of developed countries, and we must adopt an asymmetrical strategy of catching up and overtaking, bringing our own advantages to bear. In core technological fields where it would be impossible for us to catch up by 2050, we must research asymmetrical steps to catch up and overtake. Internationally, if you don’t have the advantage of core technologies, you don’t have the political momentum. We must make a big effort in key fields and areas where there is a stranglehold. The same applies to the military.”

Taming the Internet

Since the introduction of the internet, Chinese Communist Party leaders have worried about its deployment as a means of subversion and spying. A speech on propaganda that Mr. Xi gave in August 2013 suggested he was alarmed by the United States’ surveillance capabilities that were exposed by Edward Snowden.

“The internet has become the main battleground of struggle over public opinion. Some comrades have said that the internet is the ‘biggest variable’ confronting us, and if it’s mishandled it will become a ‘peril weighing on our minds.’ Western anti-China forces have constantly and vainly tried to exploit the internet to ‘topple China,’ and years ago some Western politicians declared that ‘with the internet, we have a way to deal with China’ and ‘socialist countries will throw themselves into the arms of the West, and it will start from the internet.’ To judge from the United States’ Prism, XKeyscore and other surveillance programs, the capabilities and scale of their internet activities far, far exceed what everyone had imagined. Whether we can stand our ground and win this battle over the internet has a direct bearing on our country’s ideological and political security.”

Racing for a Military Edge

China has been spending heavily to upgrade its military. In a December 2014 speech, though, Mr. Xi warned Chinese military officials that they risked being eclipsed technologically by the United States.

“A new technological and industrial revolution is brewing, a global revolution in military affairs is accelerating, and the pattern of international military competition is experiencing historic changes. The United States is the leader of the pack in this revolution in military affairs, and in many areas it holds the initiative, and it is also striving to gain new advantages in military technology. The United States is accelerating development of global rapid-strike offensive capabilities, and some advanced weaponry has technologically broken through spatiotemporal boundaries. Once they are deployed for actual combat, they will fundamentally transform the traditional array of offense and defense in warfare.”

Hidden Financial Risks

China’s leadership has become increasingly forthright about the need to defuse financial risks from growing debt, and comments Mr. Xi made in December 2016 explain why.

“Currently, financial risks are volatile and frequent. Although systemic financial risks are generally under control, risks are accumulating from nonperforming assets, liquidity, bond defaults, shadow banks, external shocks, a property bubble, government debt, and internet financing, and the financial markets are also in a mess. Some financial risks are longstanding, lurking sources of infection that are concealed very deep but may erupt in a flash. The United States subprime crisis erupted in a night. If we’re going to have big trouble in the future, it could well be in this area, and this demands high vigilance.”

Unrest Over Pollution

Mr. Xi has stepped up the Chinese government’s efforts to reduce smog, soil contamination and other pollution. Remarks that Mr. Xi made in May 2013, when China was in the midst of a smog crisis, showed how alarmed he was about public anger and protests, which Chinese officials call “mass incidents.”