The methanolysis of cyclic and acyclic phosphotriesters have been investigated at the B3LYP/6-31++G(d,p) level in the gas phase and in solution, and the effect of sulfur substitution at the attacking and leaving positions are taken into account. It is found that the activation enthalpies of the first and second steps for the methanolysis of acyclic diethyl methyl triester (DEMTE) are the same. The activation enthalpy of the second step is evidently higher than that of the first step for the thiolysis of DEMTE, while for the methanolysis of DEMTE with sulfur substitution at the leaving position (named S 2′ -DEMTE), the first step is the rate-controlling step. For the methanolysis of cyclic triester (CYTE), it proceeds through an associative mechanism with the first step being the rate-controlling step, while a concerted mechanism is observed for the methanolysis reactions with sulfur substitutions. Additionally, they proceed by concerted mechanism for the methanolysis of S 2′ -aryl-triesters (S 2′ -ARTE), where the sulfur substitutes at the leaving position. The enthalpies of all stationary points in solution are higher than those in the gas phase, indicating the importance of the solvent effect. Our calculations provide a comprehensive data and fundamental microscopic insights into the methanolysis of cyclic and acyclic phosphotriesters.