Environmental crisis and water contamination have led to worldwide exploration for advanced technologies for wastewater treatment, and one of them is photocatalytic degradation. A one-dimensional hollow nanofiber with enhanced photocatalytic properties is considered a promising material to be applied in the field. Therefore, we synthesized titanium dioxide hollow nanofibers (THNF) with extended surface area, light-harvesting properties and an anatase–rutile heterojunction via a template synthesis method and followed by a calcination process. The effect of calcination temperature on the formation and properties of THNF were determined and the possible mechanism of THNF formation was proposed. THNF nanofibers produced at 600 °C consisted of a mixture of 24.2% anatase and 75.8% rutile, with a specific surface area of 81.2776 m2/g. The hollow nanofibers also outperformed the other catalysts in terms of photocatalytic degradation of MB dye, at 85.5%. The optimum catalyst loading, dye concentration, pH, and H2O2 concentration were determined at 0.75 g/L, 10 ppm, pH 11, and 10 mM, respectively. The highest degradation of methylene blue dye achieved was 95.2% after 4 h of UV irradiation.