An alleged drug peddler is killed when police, who came under a machete attack, opened fire in Rajshahi city early today.