The present invention relates to N-formyl hydroxylamine compounds, a preparation method and a use thereof. The present invention provides a compound represented by a formula (I), or a pharmaceutically-acceptable salt of the compound, or an enantiomer of the compound, or a raceme mixture of the compound, wherein R1 is H, linear or branched alkyl containing 1 to 5 carbon atoms, R2 and R3 independently represent H, linear alkyl containing 1 to 5 carbon atoms, -OR', -SR', -halogen, -CN, -CONR', -COOR' or -COR', wherein R' is H, linear or branched alkyl containing 1 to 5 carbon atoms. The present invention further provides a method for preparing the compounds, a drug composition containing the compounds, and a use of the compounds. The compounds of the present invention have effects of prevention and/or treatment of infectious diseases, and can be used for preparation of antimicrobial drugs.