Compulsory Education Age
All children who have reached the age of six shall enroll in school and receive compulsory education for the prescribed number of years, regardless of sex, nationality, or race. In areas where that is not possible, the beginning of schooling may be postponed to the age of seven. The state shall institute a system of nine-year compulsory education.
Legal Status
The Compulsory Education Law states that the community, schools, and families shall safeguard the right to compulsory education of school-age children and adolescents, and compulsory education is defined as attending a school which is holding a schooling license granted by the government. Therefore, homeschooling is deemed to be illegal. The law does not apply to non-citizen children who hold foreign passports. The authorities of provinces, autonomous regions, and municipality directly under the central government shall decide on measure to promote compulsory education, in accordance with the degrees of economic and cultural development in their own localities. Homeschooling is encouraged by Singapore missionaries. Homeschooling in Shanghai and Beijing is a risk and must be commenced underground. Expatriates may find it easier to homeschool than nationals.
You can find more information on the regulations on compulsory education in China from the Ministry of Education and the General Office of the State Council.
Additional Resources
The Chinese Parents Who Homeschool Their Kids, and Why They Reject Public Education
Parents tell a Chinese newspaper that they choose to homeschool because they believe it is best for their children.
Homeschooling in Communist China on the Rise Despite Ban
According to the New American, an increasing number of Chinese parents are defying the law in order to teach their children without communist indoctrination.
Guideline Threatens Punishment Against Home-Schooling Parents
An English-language website reports that parents can be held legally responsible for sending their children to unlicensed, nontraditional schools, according to China's education ministry.
Legal loophole opens up chance for homeschooling (South China Morning Post)
Parents in mainland China who want an alternative to rigid education take advantage of "official oversight."