Education officials in the city are trying to curb the surfeit of extracurricular study guides written by teachers to sell to anxious students and parents.
They say these guides, often set at far too difficult a level, mean parents force their children to spend too much time doing extra academic work at the expense of other activities. Many parents also feel obliged to purchase extra materials, spending more than they can afford.
"Excessive exam-oriented exercise books have seriously burdened school students, and the new regulation is another action taken to ease the burden and create a healthy study environment," the commission said.
Publishers often invite senior teachers who have set exams to compile textbooks, hoping the fact they are written by examiners will attract parents.
Teachers who flout the ban will be barred from all city-level exam design, writing and editing textbooks, or giving lectures. They will also be stripped of "senior" status, losing prestige and pay.
The commission examined more than 1,500 books available locally and found many "poorly written or duplicating content from other books".
"We are worried about the quality of these extracurricular books, whose content is monotonous and seriously surpasses the normal study-level requirement," said Zhang Fusheng, a researcher with the Shanghai education commission.
Officials do not want pupils to be overwhelmed by advanced content and lose interest in their studies.
The commission's survey found nearly half of the maths revision books sold for primary school students are in fact related to the Maths Olympiad, an international maths competition for the brightest students.
From September, the commission will begin publishing its own affordable study guides.