We modeled nascent decomposition processes in cellulose pyrolysis at 327 and 600 degrees C using Car-Parrinello molecular dynamics (CPMD) simulations with rare events accelerated with the metadynamics method. We used a simulation cell comprised of two unit cells of cellulose I beta periodically repeated in three dimensions to mimic the solid cellulose. To obtain initial conditions at reasonable densities, we extracted coordinates from larger classical NPT simulations at the target temperatures. CPMD-metadynamics implemented with various sets of collective variables, such as coordination numbers of the glycosidic oxygen, yielded a variety of chemical reactions such as depolymerization, fragmentation, ring opening, and ring contraction. These reactions yielded precursors to levoglucosan (LGA)-the major product of pyrolysis-and also to minor products such as 5-hydroxy-methylfurfural (HMF) and formic acid. At 327 degrees C, we found that depolymerization via ring contraction of the glucopyranose ring to the glucofuranose ring occurs with the lowest free-energy barrier (20 kcal/mol). We suggest that this process is key for formation of liquid intermediate cellulose, observed experimentally above 260 degrees C. At 600 degrees C, we found that a precursor to LGA (pre-LGA) forms with a free-energy barrier of 36 kcal/mol via an intermediate/transition state stabilized by anchimeric assistance and hydrogen bonding. Conformational freedom provided by expansion of the cellulose matrix at 600 degrees C was found to be crucial for formation of pre-LGA. We performed several comparison calculations to gauge the accuracy of CPMD-metadynamics barriers with respect to basis set and level of theory. We found that free-energy barriers at 600 degrees C are in the order pre-LGA < pre-HMF < formic acid, explaining why LGA. is the kinetically favored product of fast cellulose pyrolysis.