The 29-year-old history and geography teacher worked at a technical college in the town of Emerainville, east of Paris.
The college principal reported the teacher to police after hearing a pupil had been offered a cannabis cigarette.
Police interviewed the pupil, who confirmed the story was true and said the teacher often boasted about "using drugs regularly" and claimed to be able to get hold of them easily.
The teacher admitted offering the joint, reported Le Parisien newspaper.
Police searched his home and found an elaborate production system for cannabis, including lamps, water pumps, fertiliser and ventilation shafts.
The teacher was sentenced to six months in prison and is banned from teaching for five years.
Story continues below…