Being able to separate electron–hole pairs effectively, semiconductor compound systems can exhibit outstanding photocatalytic activity. Based on this consideration, BiOX–TiO2 composite films were prepared in this work. Firstly, TiO2 nanotube arrays were prepared through anodization of titanium foils; then BiOX (X=Cl, Br, I) was deposited into the TiO2 nanotube arrays by vacuum impregnation and chemical precipitation to obtain the required BiOX–TiO2 composite films. The morphologies, phase components, and photocatalytic activities of the samples were characterized by using scanning electron microscopy, X-ray diffractometry, and UV–vis spectrophotometry, respectively. Results showed that the bonding between BiOX and TiO2 decreased in the order X=Cl, Br and I, as did the photocatalytic activity. The BiOCl–TiO2 composite film exhibited better photocatalytic activity than those of the other samples due to effective transportation and long lifetime of the photo-induced electrons. Further experiments indicated that with BiOCl–TiO2 composite film as photocatalysts, the decolorization ratio of methyl orange solution reached 99.7% under xenon-light irradiation for 8h.