Diffusive shock acceleration by the shockwaves in supernova remnants (SNRs) is widely accepted as the dominant source for Galactic cosmic rays. However, it is unknown what determines the maximum energy of accelerated particles. The surrounding environment could be one of the key parameters. The SNR RCW 86 shows both thermal and non-thermal X-ray emission with different spatial morphologies. These emission originate from the shock-heated plasma and accelerated electrons respectively, and their intensities reflect their density distributions. Thus, the remnant provides a suitable laboratory to test possible association between the acceleration efficiency and the environment. In this paper, we present results of spatially resolved spectroscopy of the entire remnant with Suzaku. The spacially-resolved spectra are well reproduced with a combination of a power-law for synchrotron emission and a two-component optically thin thermal plasma, corresponding to the shocked interstellar medium (ISM) with kT of 0.3-0.6 keV and Fe-dominated ejecta. It is discovered that the photon index of the nonthermal component becomes smaller with decreasing the emission measure of the shocked ISM, where the shock speed has remained high. This result implies that the maximum energy of accelerated electrons in RCW 86 is higher in the low-density and higher shock speed regions.