The invention discloses a method for measuring the content of humic acid in oil-containing sludge in oilfield in the sludge treatment field. The method comprises the following steps: 1, preparing a sludge sample; 2, preparing a solution to be measured; 3, drawing a standard curve: preparing multiple sodium humate standard solutions in volumetric flasks, adding a sodium hydroxide solution to scale lines, sequentially carrying out wavelength scanning on the solutions in the volumetric flasks by using an ultraviolet spectrophotometer in the order of the concentrations of the solutions in order to obtain maximum absorbance values corresponding to maximum absorption peaks, recording the maximum absorbance values, drawing the standard curve, and calculating a linear equation; and 4, measuring the concentration of the sample: diluting the solution to be measured, placing the diluted solution to be measured in the ultraviolet spectrophotometer, detecting the absorbance of the solution to be measured, and calculating the content of the humic acid by using the linear equation in step 3. The method adopting ultraviolet spectrophotometry has the advantages of short time, simplicity in operation, and high precision, and can be used in the measurement of the humic acid in the oil-containing sludge in the oilfield.