Alkyl methylphosphonic acids (RMPAs) and methylphosphonic acid (MPA), both nerve gas hydrolysis products, can be identified by gas chromatography-mass spectrometry (GC-MS). We adopted tertbutyldimethylsilylation (TBDMS) as a derivatization technique for the identification of these products by GC-MS. We found that it was difficult to detect RMPAs and MPA from evidence specimens such as soils and body fluids, and ascertained several causes for this. The first is the interference from the TBDMS derivatization. It was determined that the TBDMS derivatization of RMPAs and MPA was suppressed in the presence of divalent metal cations such as calcium and magnesium ions, as well as some neutral compounds like carbohydrates. A cleanup procedure using a strong anion-exchanger (SAX)-solid phase extraction (SPE) method was optimized to remove the interfering compounds. The second reason that detection was difficult was because of strong matrix adsorption. We elucidated that the aqueous extraction recoveries for all phosphonates were inversely correlated with the phosphate adsorption coefficient in the soil samples. To diminish the adsorption of phosphonates to soils, a method of alkali extraction was adopted. For human serum samples, we adopted acetonitrile or trichloroacetic acid deproteinization which worked to break the binding between the proteins and the phosphonates. The detection yields of RMPAs and MPA from soils and human serum were dramatically increased using these pretreatment procedures combined with extraction and/or SAX-SPE. The method of SAX-SPE was applied to various types of samples, such as seawater, drinks and human urine, and good detection yields of RMPAs and MPA were provided by GC-MS.