Due to the wide bandgap, TiO2 has a poor photocatalytic performance under visible light. Both defects and heterojunction can enhance the photocatalytic performance of TiO2; therefore, defects and heterojunction were combined to improve the activity of TiO2 that may be a novelty and feasible strategy. Herein, using the cotton fiber as the template, a special undulated TiO2−x microtube modified with MoS2 nanoflakes was synthesized via sol–gel process, hydrothermal treatment, and solid reduction method successively. The result of XPS and TEM analysis indicated the presence of Ti3+, oxygen vacancies (Ovs), and heterojunction in the TiO2−x/MoS2 composite. TiO2−x/MoS2 had a narrow energy bandgap (1.11 eV) and separated the electron–hole pair effectively. The degradation experiment of methylene blue (MB) under the visible light showed that compared with TiO2 (11.37%) and TiO2/MoS2 (45.81%), the TiO2−x/MoS2 composite had a higher degradation rate (91.32%) within 180 min. Besides, TiO2−x/MoS2 exhibited a higher photocurrent intensity (0.2 μA/cm−2) than TiO2/MoS2 (0.02 μA/cm−2) and TiO2 (0.0032 μA/cm−2). The excellent photocatalytic activity of TiO2−x/MoS2 can be attributed to the synergistic effect of heterojunction and defects, which improved the utilization of visible light significantly.