A novel method based on microextraction in packed syringe (MEPS), as a sample preparation technique in combination with gas chromatography-mass spectrometry (GC-MS) was developed using a polypyrrole (PPy) nanowires network as the extracting medium. The PPy nanowires network was prepared using a soft template technique and its characterization was studied by scanning electron microscopy (SEM). The use of micelles in this methodology has an important role in the shape of the growing polymer. The pyrrole monomer was introduced into cetyltrimethylammonium bromide (CTAB) micelles and this has led to the formation of nanowires with diameters ranging from 30 to 60 nm. The bulk PPy prepared without CTAB were all spherical particles with diameters of 100–400 nm. The PPy nanowires network was shown to have a 7–28 times higher extraction capability in comparision with bulk PPy. The developed method was applied to the analysis of some important triazine herbicides. Important parameters influencing the extraction and desorption processes were optimized and a 25 cycles of draw–eject of sample with a speed of 10 rpm gave a maximum peak area, when 2 mg of PPy nanowires network was packed in the syringe. After entrapment of the selected analytes, the desorption was performed using 150 μL of acetonitrile. Limits of detection (LODs) were in the range of 0.02 to 0.05 ng mL−1 using the time scheduled selected ion monitoring (SIM) mode. Intraday precision (RSD %) values for four replicates ranged from 7 to 10% and interday precision values obtained for three replicates measured on different days were in the range of 10–12% at a concentration level of 5 ng mL−1. The linearity of the method was in the range of 0.5–500 ng mL−1. The developed method was successfully applied to the analysis of water samples obtained from the Zayandeh-roud river and the matrix factor for the spiked real water samples was found to be in the range of 0.72–0.92.