Avijit Roy, founder of Mukto-Mona (Free-mind) blog site which champions liberal secular writing in the Muslim majority nation, suffered machete blows to the head.
"He died as he was brought to the hospital. His wife was also seriously wounded in the attack. She has lost a finger," local police chief Sirajul Islam said, adding that the attack occurred when the couple were returning from a book fair.
Police have launched a probe and recovered the machetes used in the attack on Roy, said to be around 40, but refused to say whether Islamist militants were behind the incident.
But Roy's father said the blogger, a US citizen, had received a number of "threatening" emails and messages on social media from Islamist militants unhappy with his blog.
"He was a secular humanist and has written about ten books and numerous articles," his father Ajoy Roy told AFP.
Roy is the second Bangladeshi blogger to have been murdered and the fourth writer to have been attacked since 2004.
Atheist blogger Ahmed Rajib Haider was hacked to death in 2013 by members of a little known Islamist militant group, triggering nationwide protests by the tens of thousands of secular activists.
"The attack on Roy and his wife Rafida Ahmed is outregeous. We strongly protests this attack and are deeply concerned," Imran H Sarker, head of an association for bloggers in Bangladesh, told AFP.