Nearly a quarter of adults in the commercial hub of 24 million people are smokers, according to the state-run People's Daily newspaper, citing data from the Chinese Association of Tobacco Control.
Shanghai has had a limited ban on public smoking since 2010, but the regulation covered only certain spaces such as schools and libraries.
The new rule expands the restrictions to all public indoor areas and some outdoor ones.
The southern city of Shenzhen introduced similar rules in 2014.
Also Read
China has long said it plans to ban smoking nationwide. In November, government health spokesman Mao Qunan indicated measures would be rolled out across the country by the end of last year.
But the measures, which have been available for public comment since 2014, still have not been put into effect.
Anti-smoking measures pose a dilemma for China.
On one hand, smoking has created an enormous burden on the public health system -- leading to as many as one million deaths in 2010, according to a 2015 study in medical journal The Lancet.
China's tobacco regulator shares offices and senior officials with the state-owned China National Tobacco Corp -- a near-monopoly and by far the world's biggest cigarette producer.
The China representative of the World Heath Organisation, Bernhard Schwartlander, said Tuesday in a statement that "the tobacco economy has all but stopped progress on a national smoke-free law".
"Largely because the tobacco industry in China, which has a vested interest in maintaining an economy based on the production and use of tobacco, dominates the official government body meant to curb tobacco use," he said.
Disclaimer: No Business Standard Journalist was involved in creation of this content