A simple and sensitive method for determining anatoxin-a in aqueous samples was developed using solid-phase microextraction (SPME) and gas chromatography with mass spectrometry (GC-MS) detection. Three forms of polyaniline (PANI) films and a single form of polypyrrole (PPY) film were prepared and applied for SPME. The extraction properties of these films to anatoxin-a were examined and it was shown that leucoemeraldine form of PANI displayed a better selectivity to this compound. SPME conditions were optimized by selecting the appropriate extraction parameters, including type of coating (leucoemeraldine form of PANI at 32 microm thicknesses), salt concentration (10%, w/v), time of extraction (30 min) and stirring rate (1000 rpm). The calibration curve was linear in the range from 50 to 10,000 ng/ml, with the detection limit (S/N = 3) of 11.2 ng/ml. This method was successfully applied for the analysis of anatoxin-a in the cultured media of two species of cyanobacteria.