  In this series of papers, we present a simulation-based model for the
non-linear clustering of galaxies based on separate modelling of clustering in
real space and velocity statistics. In the first paper, we present an emulator
for the real-space correlation function of galaxies, whereas the emulator of
the real-to-redshift space mapping based on velocity statistics is presented in
the second paper. Here, we show that a neural network emulator for real-space
galaxy clustering trained on data extracted from the Dark Quest suite of N-body
simulations achieves sub-per cent accuracies on scales $1 < r < 30 $ $h^{-1}
\,\mathrm{Mpc}$, and better than $3\%$ on scales $r < 1$ $h^{-1}\mathrm{Mpc}$
in predicting the clustering of dark-matter haloes with number density
$10^{-3.5}$ $(h^{-1}\mathrm{Mpc})^{-3}$, close to that of SDSS LOWZ-like
galaxies. The halo emulator can be combined with a galaxy-halo connection model
to predict the galaxy correlation function through the halo model. We
demonstrate that we accurately recover the cosmological and galaxy-halo
connection parameters when galaxy clustering depends only on the mass of the
galaxies' host halos. Furthermore, the constraining power in $\sigma_8$
increases by about a factor of $2$ when including scales smaller than $5$
$h^{-1} \,\mathrm{Mpc}$. However, when mass is not the only property
responsible for galaxy clustering, as observed in hydrodynamical or
semi-analytic models of galaxy formation, our emulator gives biased constraints
on $\sigma_8$. This bias disappears when small scales ($r < 10$
$h^{-1}\mathrm{Mpc}$) are excluded from the analysis. This shows that a vanilla
halo model could introduce biases into the analysis of future datasets.
