In this work, pure and 2, 4, 6 mol% Cr-doped WO3 nanofibers were successfully synthesized via an electrospinning method. The morphological and microstructural properties of these nanofibers were analyzed by various kinds of techniques. The grain sizes of the WO3 nanocrystal were greatly decreased by Cr doping. X-ray photoelectron spectroscopy results confirmed the existence of Cr3+ and the increased amount of both chemisorbed oxygen and oxygen vacancy after Cr doping. The gas-sensing properties of pure and Cr-doped WO3 nanofibers were tested at the optimal operating temperatures. The results indicated that among all the samples (0, 2, 4 and 6 mol% Cr-doped WO3 nanofibers), 4 mol% Cr-doped WO3 nanofibers showed the highest response towards 100 ppm xylene. At the same time, the sensors based on 4 mol% Cr-doped WO3 nanofibers also exhibited good repeatability, selectivity and long term stability, which were critical for designing high performance xylene gas sensor. The sensing mechanism of the enhanced gas sensing properties was also discussed. We suggest the increasing oxygen vacancies, surface chemisorbed oxygen species and defects in the lattice created after Cr doping to be the underlying reason for enhancement of charge carrier density and accelerated reactions with xylene.