A novel extrinsic Fabry–Perot interferometric (EFPI) ultrasonic sensor is developed that can detect ultrasonic signals of partial discharge (PD) in high-voltage electrical equipment under different temperature and pressure conditions. The unique structure of the novel sensor is able to balance the pressure difference between the two sides of the quartz diaphragm driven by the temperature and the density of the insulating medium, and the inner surface of the quartz diaphragm and the end face of the optical fiber in the sensor are coated, thus considerably improving the sensor sensitivity. Experiments are performed on the novel sensor at different temperatures and measurement distances, and the results verify the temperature, frequency, sensitivity and other types of detection performance, showing that the proposed sensor provides a novel means for detecting partial discharge of high-voltage electrical equipment.