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.
"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.
Also Read
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.
Disclaimer: No Business Standard Journalist was involved in creation of this content