The invention discloses a method for preparing hydroxyl phosphonate. According to the method, an alkali metal compound is used as a monocomponent catalyst to catalyze a hydrogen phosphonylation reaction of aldehyde or ketone so as to prepare hydroxyl phosphonate. The alkali metal compound is one compound selected from n-butyllithium, 2,6-lithium diisopropyl aniline, 2,6-sodium diisopropyl aniline, 2,6-potassium diisopropyl aniline, 2,6-lithium dimethylaniline, 2,6-sodium dimethylaniline, 2,6-potassium dimethylaniline, phenylamino lithium, phenylamino sodium, phenylamino potassium, bi(trimethylsilyl) amido lithium, bi(trimethylsilyl)amido sodium, bi(trimethylsilyl)amido potassium, lithium diisopropylamide, sodium diisopropylamide and potassium diisopropylamide. The method provided by the invention has advantages as follows: catalytic activity is high; reaction time is short; dosage of the catalyst can be reduced to one thousand; reaction conditions are mild; yield is high; and the method has good universality for aldehyde and ketone substrates.