The need for advancement in filtration technology has spurred attention to advanced materials, such as electrospun nanofiber membranes, for providing clean water at a low cost with minimum initial investment. Polymer nanofibers can be fabricated by using different techniques, such as template synthesis, self-assembly, drawing, phase separation, and electrospinning. Due to its distinctive properties, electrospinning has become a method of choice for fabricating nanofiber membranes quickly with minimal investment. In this study, polyacrylonitrile (PAN) was dissolved in dimethylformamide (DMF), and different weight percentages of polyvinylpyrrolidone (PVP) and gentamicin sulfate powder were added to the solution to fabricate nanomembranes via the electrospinning process. Gentamicin was added to remove bacteria and viruses and prevent fouling, while PVP was added to make the surface of the membrane hydrophilic for enhancing the filtration rate and efficiency. Two water samples were chosen for the filtration processes: dam water and city wastewater. For the dam water sample, PH, turbidity, TDS, Ca ++ , Mg++, sulfates, nitrates, fluoride, chloride, alkalinity and silica were reduced to +3.64%,