ABSTRACT We introduce a new scheme based on the marked correlation function to probe gravity using the large-scale structure of the Universe. We illustrate our approach by applying it to simulations of the metric-variation f(R) modified gravity theory and general relativity (GR). The modifications to the equations in f(R) gravity lead to changes in the environment of large-scale structures that could, in principle, be used to distinguish this model from GR. Applying the Monte Carlo Markov Chain algorithm, we use the observed number density and two-point clustering to fix the halo occupation distribution (HOD) model parameters and build mock galaxy catalogues from both simulations. To generate a mark for galaxies when computing the marked correlation function we estimate the local density using a Voronoi tessellation. Our approach allows us to isolate the contribution to the uncertainty in the predicted marked correlation function that arises from the range of viable HOD model parameters, in addition to the sample variance error for a single set of HOD parameters. This is critical for assessing the discriminatory power of the method. In a companion paper, we apply our new scheme to a current large-scale structure survey.