Oil refinery wastewater was sequentially treated in a moving-bed biofilm reactor (MBBR) and a slow-rate sand filter (SF) in order to obtain an effluent with adequate characteristics for downstream reverse osmosis (RO) operation. Experiments were conducted in bench scale units and the results showed that the MBBR was able to remove 90% chemical oxygen demand (COD), 75% NH4+, 95% phenols, operating with a hydraulic retention time (HRT) of 9 h. Additional removal of COD (15–40%) and ammonia (30–60%) was achieved in the slow-rate SF that was also effective for removing microorganisms. The silt density index (SDI) of the treated wastewater (4.5) was below the maximum limit recommended for RO operation. The quality of the effluent from the combined treatment system (MBBR+SF) was already adequate for cooling tower make-up. The RO produced an effluent with quality compatible with that required for use in boilers.