A fiber-stable, repeatable and highly sensitive headspace solid-phase microextraction (HS-SPME) method was developed for the analysis of methamphetamine (MA) and amphetamine (AM) in urine using gas chromatography-mass spectrometry (GC-MS) in the selected ion monitoring mode. For sample preparation, the test specimen was placed in a 7 ml vial along with the additives (KOH and NaCl) and the internal standards (d8-MA and d8-AM), a glass insert containing heptafluorobutyric anhydride (HFBA) and heptafluorobutyric chloride (HFBCl) as derivatizing reagents was inserted into the vial, the vial was then sealed tightly. A SPME device with a 100 microm polydimethylsiloxane fiber was inserted into the vial and the fiber was exposed to the headspace in the insert, then the vial was heated and stirred at 100 degrees C and 600 rpm for 20 min for evaporation/adsorption/derivatization. The vaporized analytes (AM and MA) in the vial diffused into the glass insert though the holes on the insert, they absorbed onto the fiber, and then interacted with the vapor of the derivatizing reagent. Some of the analytes in the headspace of the glass insert may react with the vapor of the derivatizing reagent first, and then adsorb onto the fiber. The needle was finally removed and inserted into the injection port to desorb the analytes with the fiber exposed to the liner of the GC-MS system for analysis. By combining HFBCl and HFBA as derivatizing reagents and placing them in an insert, the HS-SPME method achieves high sensitivity for the analysis of AM and MA. Correlation coefficients derived from typical calibration curves in the 1.0-1700 ng ml(-1) range are 0.998 for MA and 0.994 for AM. The limits of detection and the limits of quantitation using a sample size of 1 ml are 0.3 and 1.0 ng ml(-1), respectively, for both MA and AM in urine specimens. Because the water hydrolysis of derivatizing reagent is much faster than the acylation reaction of the primary and secondary amines with the derivatizing reagent, the amphetamines cannot be acylated effectively over heated aqueous solution, and therefore this study provides a new acylation design in moisture surroundings. The proposed process also simplifies the procedure for urine sample preparation, and makes the automation of SPME possible.