Optical fiber Fabry-Pérot (FP) interferometer sensors have long been the focus of researchers in sensing applications because of their simple light path, low cost, compact size and convenient manufacturing methods. A miniature and highly sensitive optic fiber temperature sensor using an ultraviolet glue-filled FP cavity in a hollow capillary fiber is proposed. The sensor is fabricated by fusion splicing a single-mode fiber with a hollow capillary fiber, which is filled with ultraviolet glue to form a FP cavity. The sensor has a good linear response in the temperature testing and high-temperature sensitivity, which can be increased with the length of the FP cavity. The experimental results show that the temperature sensitivity reaches 1.174 nm/°C with a high linear response in the range of 30–60 °C. In addition, this sensor is insensitive to pressure and can be highly suitable for real-time water temperature monitoring for ocean research. The proposed ultraviolet glue-filled structure has the advantages of easy fabrication, high-temperature sensitivity, low cost and an arbitrary length of capillary, which has broad application prospects for marine survey technology, biological diagnostics and environmental monitoring.