They were remanded in custody by a court in the southeastern town of Bashkhali on charges of defaming the nation's founding leader Sheikh Mujibur Rahman, who is the father of the current premier, according to prosecutor Bikash Ranjan Dhar.
If found guilty the teachers face a maximum life imprisonment, he said.
Bangladesh's 'Sultan of Sex' detained on blackmail charges
"What they wrote in the test paper is tantamount to sedition," the prosecutor said.
The teachers are members of a local high school association, whose examination paper praised opposition official Liakat Ali, who led thousands of villagers against the construction of a giant Chinese-financed coal-fired power plant in Bashkhali in March 2016.
The protests, one of the largest over environment in the country's history, left at least four people dead and dozens injured, triggering a police crackdown in the town.
The charges relate to allegations that the test paper drew a link between Ali and Rahman, who led the country to independence from Pakistan in 1971.
Bangladesh does not have lese majeste laws but the government of Prime Minister Sheikh Hasina has used defamation laws to targeted those perceived to have criticised or mocked Hasina or her father in local press or social media.
Last month a government bureaucrat was briefly detained after a ruling party member accused him of printing an invitation letter with an allegedly poorly-drawn portrait of Rahman.
The charges against the young bureaucrat were withdrawn following a social media uproar after it was revealed that the drawing was sketched by a primary school student in a tribute to Rahman.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ