Justice Robert Julian, of Utica, issued the ban although the youth is not allergic to tobacco smoke and doesn't suffer from a health condition, such as asthma, that would be worsened by it.
Citing studies showing the health dangers of secondhand smoke, the judge's 22-page decision issued Friday said the mother's puffing was not in the boy's "best interests."
Where the child's health is involved, the judge said, the court would intervene, even if it meant overriding the parents' religious beliefs.
The woman was identified in court papers as Johnita D., 39. The boy lives in Rome, in upstate New York, with his father and his paternal grandparents, none of whom smoke.
The mother's lawyer, Joan Shkane, denounced the ruling as intrusive. Shkane said she didn't know if they would appeal.
"Are we opening the door to urine tests now?" Shkane remarked. "Will he be allowed to take air samples before the child visits?"
Nicholas' law guardian, William Koslosky, of Utica, said the teen is in excellent health, but told him last August that he didn't want to visit his mother because she smokes.
"Nicholas was ashamed that his mother was a smoker," the lawyer said. "He said his mother's house reeked."
Shkane and the child's mother claim the father and paternal grandparents are behind his smoking complaints.