A core component of the law, passed by the standing committee of the National People's Congress, is making all key network infrastructure and information systems "secure and controllable", in a move that will be a cause of worry for foreign technology firms.
President Xi Jinping, who heads a newly established national security commission, has said China's security covers a wide range of areas, including culture, politics, the military, the economy, technology and the environment.
The law would "protect people's fundamental interests", state news agency Xinhua said in a brief one-line statement.
It is part of a raft of policies being pushed by Xi's administration - including legislation on anti-terrorism, cyber-security and foreign non-government organisations - that have drawn criticism from foreign governments, business and civil society groups.
Foreign business groups and diplomats have argued that the security law is excessively broad and may isolate China from crucial technologies.
Provisions to tighten cyber-security are core to the law, one of several moves Beijing has pursued after former National Security Agency contractor Edward Snowden disclosed that U.S. spy agencies planted code in American tech exports to snoop on overseas targets.
Other rules, including a draft anti-terrorism law, similarly call for the use of "secure and controllable" technology developed in China or those technologies which use source code released to Chinese inspectors.
Those demands have riled foreign firms concerned about compromising intellectual property and losing market access.
© Thomson Reuters 2015
For the latest tech news and reviews, follow Gadgets 360 on X, Facebook, WhatsApp, Threads and Google News. For the latest videos on gadgets and tech, subscribe to our YouTube channel. If you want to know everything about top influencers, follow our in-house Who'sThat360 on Instagram and YouTube.