Large-scale Car-Parrinello molecular dynamics simulations of D-alanine oxidation catalyzed by the flavoenzyme D-amino acid oxidase have been carried out. A model of the enzyme active site was built by starting from the enzyme X-ray structure, and by testing different subsystems comprising different sets of aminoacyl residues. In this process, the stability of the enzyme-substrate complex was taken as a measure of the accuracy of the model. The activated transfer of the amino acid alpha-hydrogen from the substrate to the flavin N5 position was then induced by constraining a suitable transfer reaction coordinate, and the free energy profile of the reaction was calculated. The evolution of electronic and structural properties of both enzyme-bound substrate and flavin cofactor along the reaction path is consistent with a hydride-transfer mechanism. The calculated free energy barrier for this process (13 kcal/mol) is in excellent agreement with the activation energy value derived from the experimentally determined rate constant for the corresponding enzyme-catalyzed reaction. The electronic distribution of the reduced flavin shows that the transferred electrons tend to be centered near the C4a position rather than delocalized over the flavin pyrimidine ring. This feature is mechanistically relevant in that such an electronic distribution may promote the subsequent enzyme-catalyzed reduction of molecular oxygen to yield hydrogen peroxide via a postulated flavin 4a-peroxide intermediate. These results also show that a first-principles molecular dynamics approach is suitable to study the mechanism of complex enzymatic processes, provided that a smaller, yet reliable, subsystem of the enzyme can be identified, and special computational techniques are employed to enhance the sampling of the reactive event.