Gill Pasola, head of school at Eythorne Elvington Community Primary School in Dover, asked parents to improve their behaviour at the gates in a newsletter.
She said the issue had been raised by the schools council which is made up of elected representatives from each year.
The adults were told to smoke well away from the school and mind their language in the vicinity.
On BBC South East Today's Facebook page, Chantelle Amini wrote: "Good! All schools should implement this! Nothing worse than having to walk through a cloud of smoke with your child!"
Mari Ellen Edwards said: "Good on the children for telling on the parents!"
Gary Gardiner posted: "Sounds like they need to go back to school!!"
Chris McGovern, a former head teacher and chairman of the Campaign for Real Education, said: "Normally we have bad news stories about schools going into special measures, but here we have a good news story about pupils putting some of their own parents into special measures."
He said the primary pupils had been rated outstanding by Ofsted for their behaviour.
"They actually in this particular case are going to teach their parents a little bit about how to behave, I suspect," he added.
He said their parents should be proud of them.
Waiting outside the school gates this afternoon, it was clear not all parents had got the message - or if they had they weren't choosing to do as they're told.
Children finishing school for the day explained their decision and said smoking could kill children and cause asthma - while swearing set a bad example to youngsters.
The head teacher declined to comment.
In the school's last Ofsted report, inspectors said the pupils concentrated well, tried their hardest to do their best, listened carefully, showed confidence and were polite and courteous towards one another and to adults and visitors.
"They greet everyone with bright smiles and hold open doors. Consequently, the atmosphere in the school is happy and harmonious," inspectors wrote.
Parents have been told to stop smoking and swearing outside a school - after pupils raised the issue as a problem.