Car-Parrinello-based ab initio molecular dynamics simulations (CPMD) combined with metadynamics (MTD) simulations were used to determine the reaction energetics for the beta-D-xylose condensation reaction to form beta-1,4-linked xylobiose in a dilute acid solution. Protonation of the hydroxyl group on the xylose molecule and the subsequent breaking of the C-O bond were found to be the rate-limiting step during the xylose condensation reaction. Water and water structure was found to play a critical role in these reactions due to the proton's high affinity for water molecules. The reaction free energy and reaction barrier were determined using CPMD-MTD. We found that solvent reorganization due to proton partial desolvation must be taken into account in order to obtain the correct reaction activation energy. Our calculated reaction free energy and reaction activation energy compare well with available experimental results.