Selective halogenation is important in synthetic chemistry. BesD, a new member of the non-heme Fe(II)/alpha-ketoglutarate (alpha KG)-dependent halogenase family, can activate the sp(3) C-H bond and halogenate lysine, in particular without a carrier protein. Using the density functional calculations, a chlorination mechanism in BesD has been proposed, mainly including the formation of Cl-Fe(IV)=O through the alpha KG decarboxylation, the isomerization of Cl-Fe(IV)=O, the substrate hydrogen abstraction by Fe(IV)=O, and the rebound of chloro to the substrate carbon radical. The hydrogen abstraction is rate-limiting. The isomerization of Cl-Fe(IV)=O is essential for the hydrogen abstraction and the chiral selectivity. The BesD-catalyzed bromination and azidation of lysine adopt the same mechanism as the chlorination. The hardly-changed overall barriers indicate that the introduced ligands (X) do not affect the reaction rate significantly, implying that the X-introduced reactions catalyzed by BesD may be extended to other X anions.