The change in electronic structure of V1−xWxO2 thin films across a metal-insulator transition (MIT) is investigated in terms of hard x-ray photoemission spectroscopy and x-ray absorption spectroscopy. In the lower doping range (0 x 0.08), the spectra exhibit the characteristic features for the dimerization of V ions in the monoclinic phase, indicating that Peierls-like instability predominately causes the MIT in this range. Conversely, in the higher doping range (0.1 x), spectral weight transfer is observed from the coherent part at the Fermi level to the incoherent part, indicating that the ground state of V1−xWxO2 films in this range is a typical Mott insulator. The results suggest that the unusual phase diagram of the V1−xWxO2 thin films originates from the competition between the Peierls and Mott instabilities.