This paper deals with the thermal model and compensation of the thermal drift in a capacitive voltage sensor installed on top of the semiconducting layer of cross-linked polyethylene (XLPE) cable. The analysis of the thermal phenomena underlying the system shows a high dependency on the relative permittivity of the XLPE material. The first compensation method consists of installing an external capacitor with the same temperature coefficient as the cable capacitance. This method is limited because of the nonlinear thermal behavior of the cable capacitance. The second method consists of measuring the conductor current and the outer XLPE temperature, and estimating the temperatures and properties of the cable by means of an offline-derived, built-in model. The simulations and tests show the obtained improvements of the different methods in the operational temperature range.