Flash pyrolysis-gas chromatography-mass spectrometry (Py-GC-MS) and in situ methylation-pyrolysis-gas chromatography-mass spectrometry (methylation-Py-GC-MS) have been employed for a study of molecular structure of kerogens from source rocks of the Tarim Basin. The main products from Py-GC-MS of the Ordovician and Triassic kerogens from the Tarim Basin are n-alkanes and n-alk-1-enes which decrease in relative abundance with in- creased carbon number. The major products from methylation-Py-GC-MS are normal saturated fatty acid methyl esters which show maxima at C16 and C18. These aliphatic compounds are mainly from lipids of planktonic algae. Moreover, there are more abundant long-chain fatty acids (C20-C26) and normal n-alkanes and n-alk-1-enes (C15-C25) in pyrolysates of Triassic kerogens than that of Ordovician kerogens, reflecting the discrepancies in sources of the Triassic kerogens and the Ordovician kerogens. Besides these aliphatic compounds, methoxyl benzoic acid methyl esters were detected only in products from methylation-Py-GC-MS of late Ordovician kerogen TAC1-1, which possibly was the first molecular evidence for the appearance of moss or other terrestrial plants in the Tarim Basin. In addition, the relative intensity of 17β(H)-trisnorhopane, 17 β(H),21 α(H)-30-normoretane and 17 β(H)-moretane is lower, but 17α(H)-trisnorhopane and 17 α(H)-30-norhopane is higher in the pyrolysates of the Ordovician kerogens in comparison with the pyrolysates of the Triassic kerogens. Moreover, Pr-1-ene has been detected in pyrolysates of Triassic kerogens. These differences in pyrolysates consist with maturity of kerogens. In conclu- sion, combination of methylation-Py-GC-MS and Py-GC-MS are useful tools to investigate the molecular structure of geomacromolecules and can be subject to type the organic matter, com- pare the maturity of kerogens and carry out the oil-source correlation.