As many as eight unidentified men attacked a group of officers as they arrived at a police checkpoint at Ashulia, the country's biggest garment factory hub 30 kilometres (18 miles) north of the capital.
"They stabbed two police constables with big knives. One of the constables was stabbed in his neck and he died after he was brought to a nearby hospital," assistant superintendent of police Mosfequr Rahman told AFP.
The attackers fled on motorbikes, firing blank shots to try to ceate panic, Rahman said.
Home Minister Asaduzzaman Khan Kamal said he suspected that hardline Islamists behind a recent spate of targeted murders were also responsible for today's violence.
"I think so," he told reporters, agreeing to a query on whether the policeman's killing was connected to the deadly violence.
"They are carrying out these (killings), sometimes taking the name of JMB (Jamayetul Mujahideen Bangladesh), sometimes Harkat ul Jihad (Al Islami), sometimes Ansarullah Bangla Team and sometimes Islamic State," he said, referring to hardline groups.
A police officer was stabbed to death at a busy bus station in Dhaka less than two weeks ago.
Fears of Islamist violence have been rising in mainly moderate Muslim-majority Bangladesh after four atheist bloggers were murdered this year, all by machete-wielding attackers.
A publisher of secular books was stabbed to death at the weekend and two other secular writers and a publisher were attacked on the same day.
Bangladesh has also been rocked by the recent murders of an Italian aid worker and a Japanese farmer and by blasts at a major Shia shrine which left two people dead.
The government has rejected claims of responsibility from two different foreign terrorist groups for those attacks.
Prime Minister Sheikh Hasina's government launched a crackdown on local Islamist groups after facing Western criticism this year for failing to stop the bloodshed.