The use of sunlight for photocatalytic oxidation is an ideal strategy, but it is limited by factors such as insufficient light absorption intensity of the photocatalyst and easy recombination of photogenerated electron holes. TiO2 is favored by researchers as an environment-friendly catalyst. In this paper, TiO2 is combined with WO3 to obtain a nanofiber with excellent catalytic performance under sunlight. The WO3/TiO2 composite nanofibers were synthesized by using the electrospinning method. The X-ray diffraction (XRD) analysis indicated that WO3 was successfully integrated onto the surface of TiO2. The photodegradation performance and photocurrent analysis of the prepared nanofibers showed that the addition of WO3 really improved the photocatalytic performance of TiO2 nanofibers, methylene blue (MB) degradation rate increased from 72% to 96%, and 5% was the optimal composite mole percentage of W to Ti. The scanning electron microscopy (SEM), X-ray photoelectron spectroscopy (XPS), UV-Vis diffuse reflectance spectra (UV-Vis DRS), and Brunauer-Emmett-Teller (BET) analysis further characterized the properties of 5% WO3/TiO2 nanofibers. The H2 generation rate of 5% WO3/TiO2 nanofibers was 107.15 μmol·g−1·h−1, in comparison with that of TiO2 nanofibers (73.21 μmol·g−1·h−1) under the same condition. The 5% WO3/TiO2 produced ·OH under illumination, which played an important role in the MB degradation. Also, the enhanced photocatalytic mechanism was also proposed based on the detailed analysis of the band gap and the active species trapping experiment. The results indicated that the effective separation of Z-scheme photogenerated electron-hole pairs and transfer system constructed between TiO2 and WO3 endowed the excellent photocatalytic activity of 5% WO3/TiO2 nanofibers.