A facile and green method was developed for the simultaneous doping of nitrogen, boron, and fluorine in TiO2 by H2TiO3 via a microwave-assisted route. The ionic liquid (IL) [BMIm]BF4 serves not only as microwave absorbent but also as a dopant. The IL also shows the ability to self-assemble under microwave irradiation, which causes it to act as an inhibitor for the growth of the TiO2 particles. The N–B–F-tri-doped TiO2 obtained exhibits large specific surface area, small crystal size, and a mesoporous structure, and the mechanism for the formation of the N–B–F-tri-doped TiO2 was proposed. The prepared materials exhibit excellent visible light photocatalytic activity in the degradation of organic pollutants, including methyl orange, rhodamine B, Orange G, and reactive red X, which is attributed to the presence of a Ti–B–N structure on the TiO2 surface, inducing a narrow band gap of 2.78eV, and the synergistic effects of N, B, and F, which improve the separation efficiency of the photo-generated electron/hole pairs. The results obtained may provide a new sight for the application of ILs in the microwave-assisted preparation of nanomaterials.