This paper develops a competitive Ramsey–Cass–Koopmans framework in which an infectious disease is considered. A lockdown is introduced to control the disease spread. Considering the dynamics, a stable limit cycle can emerge near the endemic steady-state, through a Hopf bifurcation, when the share of infectives increases sufficiently the marginal utility of consumption. Particularly, we prove that it is possible to tune the lockdown to simultaneously obtain the limit cycle disappearance and the disease eradication (Bogdanov–Takens bifurcation). In this sense, the lockdown allows hitting two birds with one stone.