In this study, we systematically investigate an inverse method for heterogeneous porous media to obtain porosity and permeability fields considering only production well data. The forward modeling of the input data, namely pressure and saturation fields, is based on the motion equations of a coupled Darcy flow system involving two phases of isothermal fluid flow. We discretize these equations using a multiscale finite volume simulation technique in the spatial domain, and the backward Euler method in time domain. In the inversion procedure, we combine a global optimization method, the Markov Chain Monte Carlo (MCMC) method, with a local optimization method, the Levenberg–Marquardt (LM) method. The MCMC was implemented as the Random Walk algorithm, and to generate the samples of the porosity and permeability fields, we employed Karhunen–Loève (KL) expansion of second-order stationary fields with Gaussian covariance. The coefficients of the KL expansion are estimated by minimizing the norm of the residual dependent on these fields. At the end of the MCMC iterations, we refine the KL coefficients associated with the porosity and permeability fields using the LM method. We verify in the numerical experiments that the accuracy of the porosity and permeability fields is improved by the LM refinement step.