It was the latest public charge from the Obama administration, which has concluded that calling out China publicly could curb what U.S. officials call a brazen and sophisticated quest for American secrets stored online.
"We are determined to work more vigorously with China and other partners to establish international norms of responsible behavior in cyberspace," Hagel said in a conference hall packed with Asian military officials.
China has denied Washington's accusations, most pointedly last week, when it said it did not need to steal American military hardware blueprints because it was more than capable of producing its own.
After Hagel's speech, a Chinese general took to the microphone. In unusually pointed remarks, Maj. Gen. Yao Yunzhu, the director of China-America Defense Relations at the Chinese military's Academy of Military Science, started with a wry remark.
"Thank you for mentioning China several times," in the speech, Yao said, drawing giggles and muttering. U.S. officials have long said their growing footprint in the Asia-Pacific region is not meant to offset China's military might, she said. "China is not convinced," she noted.
Hagel said the United States is hoping to build a more constructive relationship with China by fostering closer ties between the two militaries.
"The only way you can do that is you talk to each other," Hagel said. "You have to be direct with each other."
Hagel's lengthy speech was meant to reassure allies in the region that steep defense cuts and security challenges in the Middle East and North Africa have not derailed an initiative to shift the U.S. military's attention toward Asia as it wraps up a period of messy, unpopular wars.
China's ascendance in maritime affairs, space and cyberspace has alarmed many in the region in recent years, said Patrick M. Cronin, an Asia-Pacific expert at the Center for a New American Security.
"The 2008 global financial crisis and over-commitment of U.S. forces in Iraq and Afghanistan served to accelerate the perception of China as the next superpower and the decline of America," he said. "The gradual global awakening to China's cyber espionage heightened doubts about America's power, a foundation on which regional security has rested since the end of World War II."
America's fiscal crunch will not derail its policy goals, Hagel argued.
"It is true that the Department of Defense will have fewer resources than in the past," the secretary said. "It would be unwise and short-sighted to conclude, however, that our commitment to the rebalance cannot be sustained."
U.S. military spending will continue to represent roughly 40 percent of worldwide defense expenditures "even under the most extreme budget scenarios," he added.
By 2020, Hagel said, the U.S. intends to base 60 percent of its naval assets in the Pacific. The Air Force, meanwhile, has stationed 60 percent of its troops abroad in the Asia-Pacific region.
The United States is working to expand its partnerships with Washington's closest allies in the region: Japan, South Korea and Australia, Hagel said. He said the U.S. defense establishment continues to produce "cutting-edge" technology allies can benefit from.
Hagel, meanwhile, warned attendees about conducting "business as usual" with North Korea, a pariah state that counts China as its main ally in the region.
"The United States will not stand by while North Korea seeks to develop a nuclear-armed missile that can target the United States," he said.
Ellen Nakashima contributed to this report.