In this Letter, we investigate the environmental dependence of dark matter halos in theories which attempt to explain the accelerated expansion of the Universe by modifying general relativity (GR). Using high-resolution N-body simulations in f(R) gravity models which recover GR in dense environments by virtue of the chameleon mechanism, we find a significant difference, which depends on the environment, between the lensing and dynamical masses of dark matter halos. This environmental dependence of the halo properties can be used as a smoking gun to test GR observationally.