Detailed mechanisms for the synthesis of p-xylene as well as the primary byproducts observed experimentally, 2,5-hexadione and 2,5-dimethyl-3-[(4-methyl-1,3-cyclohexadien-1-yl)methyl]furan, from ethylene and 2,5-dimethylfuran (DMF) mediated by H-BEA are obtained using an extended QM/MM model containing 208 tetrahedral atoms. The formation of p-xylene proceeds via Diels-Alder cycloaddition of ethylene and DMF, which is rate-limiting, followed by Brønsted acid-catalyzed dehydration. Secondary addition of DMF to the substrate following the Diels-Alder reaction leads to 2,5-dimethyl-3-[(4-methyl-1,3-cyclohexadien-1-yl)methyl]furan. The analysis of the free energies associated with the mechanisms suggests that the secondary addition can be eliminated by introducing n-heptane as an inert solvent to decrease the loading of DMF in the zeolite or by using a weak Brønsted acid site to facilitate the dehydration of the Diels-Alder product, for which the rate is determined by the deprotonation via the conjugate base of the active site. Water formed in the dehydration process can react directly with DMF to form 2,5-hexadione, thereby decreasing the yield of p-xylene. However, the free-energy barriers for the formation of 2,5-heaxdione compared to the Diels-Alder reaction indicate that DMF and 2,5-hexadione will be equilibrated. Therefore, the 2,5-hexadione yield can be minimized by operating at a high conversion of DMF.