A flexible hydrogen sulfide (H2S) gas sensor based on polyaniline-polyethylene oxide (PAni-PEO) nanofibers doped by camphorsulfonic acid (HCSA) is presented in this paper. The proposed sensor exhibits good sensitivity, good recovery speed and superior performance compared with previously proposed H2S PAni-based sensors. The sensor was fabricated by a simple and low-cost procedure on flexible paper and polyimide substrates. Substrates with pre-fabricated metal electrodes were placed in front of the syringe needle of the electrospinning setup and electrospun nanofibers were deposited directly on the interdigitated electrodes. The effects of several processing and environmental parameters on the morphology of the nanofibers and their sensitivity to H2S have been investigated. The cross-sensitivity of the sensor to nitrogen dioxide and acetone, as two interfering gases, has been explored and the sensor showed good selectivity towards H2S. The proposed sensor can be used in wearable applications and has the potential to be used in a number of applications such as in industrial plants, and in monitoring human body/mouth odor and foods' freshness.