Abstract The effect of the surrounding environment of supernova remnant shocks on nonthermal X-rays from accelerated electrons, with or without interacting dense material, is an open issue. We conduct spatially resolved X-ray spectroscopy of the shock–cloud interacting region of RCW 86 with XMM–Newton. It is found that bright soft X-ray filaments surround the dense cloud, observed with 12CO and H i emission lines. These filaments are brighter in thermal X-ray emission, and fainter and possibly softer in synchrotron X-rays, compared to those without interaction. Our results show that the shock decelerates due to the interaction with clouds, which results in an enhancement of thermal X-ray emission. This could possibly also explain the softer X-ray synchrotron component, because it implies that those shocks that move through a low-density environment, and therefore decelerate much less, can be more efficient accelerators. This is similar to SN 1006 and Tycho, and is in contrast to RX J1713.7−3946. This difference among remnants may be due to the clumpiness of dense material interacting with the shock, which should be examined in future observations.