The effect of the van der Waals (vdW) interaction on the simulation of the electron energy-loss near edge structure (ELNES) by a first-principles band-structure calculation is reported. The effect of the vdW interaction is considered by the Tkatchenko-Scheffler scheme, and the change of the spectrum profile and the energy shift are discussed. We perform calculations on systems in the solid, liquid and gaseous states. The transition energy shifts to lower energy by approximately 0.1eV in the condensed (solid and liquid) systems by introducing the vdW effect into the calculation, whereas the energy shift in the gaseous models is negligible owing to the long intermolecular distance. We reveal that the vdW interaction exhibits a larger effect on the excited state than the ground state owing to the presence of an excited electron in the unoccupied band. Moreover, the vdW effect is found to depend on the local electron density and the molecular coordination. In addition, this study suggests that the detection of the vdW interactions exhibited within materials is possible by a very stable and high resolution observation.