d-Cycloserine (DCS), an antibiotic used in the treatment of drug-resistant tuberculosis, was traditionally believed to irreversibly inhibit the pyridoxal-5'-phosphate (PLP)-dependent alanine racemase from Mycobacterium tuberculosis (MtAlr). However, recent research suggests that the inhibition is reversible, as MtAlr can be reactivated by destructing DCS. This study employs the hybrid quantum mechanics/molecular mechanics (QM/MM) method to investigate the mechanisms of MtAlr inhibition and DCS destruction. Computational results indicate that the inhibition reaction via an "isoxazole-forming" pathway is kinetically favorable, while the DCS destruction reaction via an "oxime-forming" pathway is thermodynamically favorable, explaining the irreversible inhibition of DCS. For the inhibition reaction, the isoxazole product was found to prefer the keto form, contrary to the previously proposed enol form. Moreover, K44 and D322' were identified as key residues. K44 transfers the proton from Cα and Cβ of DCS, while D322' stabilizes the carbanion intermediate and isoxazole product via electrostatic interaction with the protonated K44. Such electrostatic interaction was eliminated in the DCS-resistance variant, D322'N, making the inhibition reaction unfavorable. For DCS destruction, an "up-to-down" conformational change is required to place the isoxazolidinone ring in an appropriate position for hydrolysis. The deprotonated Y273' facilitates the hydrolysis reaction by enhancing the nucleophilicity of the water molecule. Throughout the whole reaction of MtAlr, PLP plays multiple roles, including stabilizing the carbanion intermediate and acting as a proton shuttle. Overall, this study provides deeper insight into the catalytic mechanism of MtAlr and offers valuable insights for drug development.