Whereas exceptional mechanical and radiation performances have been found in the emergent medium- and high-entropy alloys (MEAs and HEAs), the importance of their complex atomic environment, reflecting diversity in atomic size and chemistry, to defect transport has been largely unexplored at the atomic level. Here we adopt a local structure approach based on the atomic pair distribution function measurements in combination with density functional theory calculations to investigate a series of body-centered cubic (BCC) MEAs and HEAs. Our results demonstrate that all alloys exhibit local lattice distortions (LLD) to some extent, but an anomalous LLD, merging of the first and second atomic shells, occurs only in the Zr- and/or Hf-containing MEAs and HEAs. In addition, through the ab-initio simulations we show that charge transfer among the elements profoundly reduce the size mismatch effect. The observed competitive coexistence between LLD and charge transfer not only demonstrates the importance of the electronic effects on the local environments in MEAs and HEAs, but also provides new perspectives to in-depth understanding of the complicated defect transport in these alloys.