In this work a new methodology is proposed to correct the thermal lag error in data from unpumped CTD sensors installed on Slocum gliders. The advantage of the new approach is twofold: first, it takes into account the variable speed of the glider; and second, it can be applied to CTD profiles from an autonomous platform either with or without a reference cast. The proposed methodology finds values for four correction parameters that minimize the area between two temperature–salinity curves given by two CTD profiles. A field experiment with a Slocum glider and a standard CTD was conducted to test the method. Thermal lag–induced salinity error of about 0.3 psu was found and successfully corrected.