In this paper, we study the distribution of dark matter haloes and voids using high-resolution simulations in f(R) gravity models with the chameleon mechanism to screen the fifth force in a dense environment. For dark matter haloes, we show that the semi-analytic thin-shell condition provides a good approximation to describe the mass and environmental dependence of the screening of the fifth force in haloes. Due to stronger gravity, there are far more massive haloes and large voids in f(R) models compared with Λ cold dark matter (ΛCDM) models. The numbers of voids with an effective radius of 15 h−1 Mpc are twice and four times as many as those in ΛCDM for f(R) models with |fR0|= 10−5 and 10−4, respectively. This provides a new means to test the models using the upcoming observational data. We also find that haloes inside voids are significantly less screened in our simulations, and so are ideal objects for the gravity test.