In order to develop multifunctional quaternary ammonium salts and explore their advantages as modifiers for wastewater treatment, castor oil-based quaternary ammonium salts were synthesised and subsequently used as modifiers for attapulgite treatment. The structures of untreated and treated attapulgite were compared by Fourier transform infrared spectra and X-ray diffraction. The mechanism of modification was speculated. Various factors such as the amount of modified attapulgite, temperature and pH were also investigated in the batch experiments on the removal rates of acetone and phenol from wastewaters. The synthesis conditions were set as follows: the reaction temperature was 80 °C, the reaction time was 8 h, the molar ratio of castor oil to N,N-dimethyl-1,3-propanediamine was 1:5, the catalyst was 6% NaOH and the product yield was about 64.72%. The grafting rate of the castor oil-based quaternary ammonium salt was about 99.6% when the amount of modifier was 0.69 g per 5 g of attapulgite, the ultrasound treatment time was 11 min and the pH was 5. The quaternary ammonium salt was only associated with the surface of attapulgite and did not change the rod-like crystal structure of the silicate. The modified attapulgite is much more fibrous and exhibits a good distribution of crystal bundles. The removal rates were found to be less favourable under strongly acidic and strongly alkaline conditions. Under suitable conditions, for 50 mL industrial wastewaters (phenol: 100–160 mg/L; acetone: 680–800 mg/L), the amount of modified attapulgite was 1 g, the temperature was 80 °C and the pH was 7, and the maximum removal rates of acetone and phenol after 80 min reached about 65.71% and 78.72%, respectively, which were higher than those of ATP.