A method based on headspace sorptive extraction (HSSE) in combination with thermal desorption–gas chromatography–mass spectrometry (TD–GC–MS) has been developed for the simultaneous determination of six organotin compounds (OTCs), corresponding to mono- and di-substituted methyltin, butyltin and octyltin species. Several parameters affecting both the headspace extraction and thermal desorption steps were carefully optimized using multivariate designs. Analytes were derivatized by in situ ethylation with sodium tetraethylborate. The optimized method was applied to the analysis of water samples of different origins, as well as to checking the migration of the studied compounds from commercially available plastic containers to the adequate liquid simulant. Quantification was carried out against aqueous calibration curves using diphenyltin as internal standard, providing detection limits of between 1.7 and 7.0ng(Sn)L−1, depending on the compound, and repeatabilities lower than 10% in terms of relative standard deviation. The applicability of the method was assessed by means of recovery studies and satisfactory values for all compounds were attained. The release of OTCs from the tested packages to the liquid simulant was confirmed, concentrations as high as 2.4μg(Sn)L−1 being found for dioctyltin. Even though the proposed method was developed for organotin halides, its application to an organotin ester shows its suitability for determining these compounds in migration assays.