For landfarming of oil refinery waste to be sustainable, it is crucial to know the toxicity and chemical composition of the waste. We determined the chemical composition of waste known as American Petroleum Institute sludge and tested its toxicity in two different soils using the earthworm Eisenia andrei (Oligochaeta) in standardized bioassays. We compared the chemical composition of the sludge with available chemical profiles of the landfarming site where sludge of the same origin had been landfarmed for several years. The concentrations of Al, Mn, Pb, S and Zn and diesel range organics were higher in the landfarmed soil than in the sludge, indicating possible accumulation in the soil over time. Although no traces of volatile organic compounds were previously found in the landfarming site soil, we found high levels in the American Petroleum Institute sludge, indicating that these volatiles may not pose a long-term problem in the soil. Polycyclic aromatic hydrocarbons and gasoline range organics were present in the sludge at higher concentrations than in the site soil, indicating that their remediation through landfarming may have had some degree of success.Earthworm biomass and reproduction were detrimentally affected at low sludge concentrations, which could have population level effects over time in a landfarming site.