The hydrazones have the absorption in the ultraviolet-visible (UV-vis) spectral region. The hydrazones can be formed by the reaction of aldehyde group and dinitrophenylhydrazine (DNPH) in acidic solution. The determination of glyoxal and glyoxalic acid in aldehyde solution was performed by high performance liquid chromatography (HPLC). The proper derivatization conditions were as follows: the reaction temperature of 70 ℃, the pH of the system of 1.75; the molar ratio of DNPH to carbonyl of 6, the reaction time of 150 min. The saturated concentration of glyoxal dihydrazone in acetonitrile solution at pH 1.75 and 20 ℃ was 20.2 mg/L. The standard curves for glyoxal and glyoxalic acid both had good linear relations in the ranges of 2-20 mg/L and 10-100 mg/L, respectively. The glyoxal and glyoxalic acid contents in the solution of oxidation of acetaldehyde to glyoxal by nitric acid were determined by this method, the repeatabilities of analysis results were excellent and the relative error compared to chemical analysis of glyoxal was 1.77% . The spiked recoveries of glyoxal and glyoxalic acid were 99.6% -103.3% and 98.1% -102.4% , respectively. The method is simple, accurate and efficient for determining aldehydes and dicarbonyl compounds.