Considering the mechanism of quorum sensing, we formulate a bacteriaimmunity model to describe the competition between bacteria and immune cells on the basis of Zhang's model (see Zhang et al. 2008, to appear, for more details). A distributed delay is introduced to characterize the time in which bacteria receive signal molecules and then combat with immune cells. We analyze the stability of the equilibrium points and discuss the existence of Hopf bifurcation near the positive equilibrium point. Finally, numerical simulation is carried out to illustrate our qualitative results.