Another person was also injured when the attackers entered a Dhaka flat.
Since February last year suspected militants have killed several secular or atheist writers and members of religious minority groups.
The two men were murdered two days after a university teacher was hacked to death by suspected Islamist militants.
So-called Islamic State (IS) claimed responsibility - but the Bangladeshi government insists there is no IS presence in the country.
Make the jump here t read the full article and more