The law was passed in December by the standing committee of the National People’s Congress. It does not stipulate any punishments for people who neglect their parents. Nevertheless, that officials felt the need to make filial duty a legal matter is a reflection of the monumental changes taking place throughout Chinese society.

Many aging parents in China, as in other industrialized nations, complain these days about not seeing their children enough. And the children say the stresses of daily life, especially in the rapidly expanding cities, prevent them from carving out time for their parents.

“China’s economy is flourishing, and lots of young people have moved away to the cities and away from their aging parents in villages,” Dang Janwu, vice director of the China Research Center on Aging, said in a telephone interview on Tuesday. “This is one of the consequences of China’s urbanization. The social welfare system can answer to material needs of the elders, but when it comes to the spiritual needs, a law like this becomes very necessary.”

Mr. Dang said the law had already been successful in prompting significant discussion of the issue.

Others have been more skeptical. On Monday, Guo Cheng, a novelist, told the 1.3-million followers of his microblog: “Kinship is part of human nature; it is ridiculous to make it into a law. It is like requiring couples who have gotten married to have a harmonious sex life.”

Nevertheless, the issue of abandoned aging parents is a real one across China. In 2011, Xinhua, the state news agency, ran an article that said nearly half of the 185 million people age 60 and older live apart from their children. People residing in a different city from their parents, including legions of migrant workers, usually find time to go home only during the Lunar New Year holiday.