The fragment molecular orbital method (FMO) has been generalized to allow for multilayer structure. Fragments are assigned to layers, and each layer can be described with a different basis set and/or level of electron correlation. Interlayer boundaries are treated in the general spirit of the FMO method since they also coincide with some interfragment boundaries. The question of the one- and two-layer FMO accuracy dependence upon the fragmentation scheme is also addressed. The new method has been applied to predict the reaction barrier and the reaction heat for the Diels-Alder reaction with a representative set of reactants based on dividing fragments in two layers. The 6-31G* basis set has been used for the active site and the 6-31G*, 6-31G, 3-21G, and STO-3G basis sets have been used for the substituents. Different levels of electron correlation (RHF, B3LYP, and MP2) have been applied to layers in systematic fashion. The one-layer FMO errors in the reaction barrier and the reaction heat were 2.0 kcal/mol or less for all levels applied (RHF, B3LYP, and MP2), relative to full ab initio methods. For the two-layer method the error was found to be several kcal/mol. Benchmark calculations of the activation barrier for the decarboxylation of phenylcyanoacetate by beta-cyclodextrin demonstrated that the two-layer calculations are efficient, being 36 times faster than the regular DFT, as well as accurate, with the error being 1.0 kcal/mol.