Polyaniline / polyethylene oxide( PANI / PEO) nanofiber is prepared by electrospinning,and effects of voltage and receiving distance on diameter of electrospinning PANI / PEO nanofiber are studied and electrospinning parameters are optimized. Parallel nanofiber arrays are prepared by controlling the receiver and orientation arrangement of nanofiber is realized; single nanofiber sensor is prepared by controlling deposition times of electrospinning solution jets and detect on NH3. The result indicates that PANI / PEO nanofiber with diameter of105 nm is prepared when the voltage is 20 k V and the receiving distance is 20 cm,and the PANI / PEO nanofiber sensor prepared under above optimized parameters has good linear response to low concentration NH3 at room temperature.