Optical properties of oilfield wastewater play an important role in the on-line measurement of oil content. As an important parameter of optical properties, absorption coefficient is usually obtained by indirectly modeling transmittance spectra. In this work, transmittance spectra of oilfield wastewater in the wavelength range of 190-900 nm at normal incidence were measured by TU-1900 double beam ultraviolet visible spectrophotometer. The absorption coefficient of oilfield wastewater was obtained by a double thickness method, and the relationship between the oil content in oilfield wastewater and its absorption coefficient was studied. The results show that the transmittance spectra of oilfield wastewater decrease with the increase of oil content. The oil content of oilfield wastewater is found to correlate negatively with its transmittance. The oil content of oilfield wastewater and its absorption coefficient have a good fitting effect at 234 nm, and the fitting error of three order polynomial fitting is minimal, with a range of 0.02-5.39%, and the fitting accuracy is 0.9940.