Green-based materials are currently considered as one of the most vital areas of sustainable development. In the present study, a water-soluble chitosan-based electrospun nanofiber membrane was prepared as a green nanocatalyst for water purification. It was noticed that the water-soluble chitosan nanofiber’s diameter was smaller and more hydrophilic (water contact angle) compared to the water-insoluble nanofiber membrane. The results show that more than 80% of methylene blue dye could be removed by the water-soluble chitosan nanofiber membrane, while only 60% of methylene blue was removed by a water-insoluble nanofiber membrane. It can be assumed that the present work will inspire the development of green nanofiber membranes to combat water pollution. © 2022, The Author(s), under exclusive license to Springer Nature Switzerland AG.