Nitrogen-vacancy centers in diamond allow measurement of environment properties such as temperature, magnetic and electric fields at the nanoscale level, of utmost relevance for several research fields, ranging from nanotechnologies to biosensing. The working principle is based on the measurement of the resonance frequency shift of a single nitrogen-vacancy center (or an ensemble of them), usually detected by monitoring the center photoluminescence emission intensity. Albeit several schemes have already been proposed, the search for the simplest and most effective one is of key relevance for real applications. Here we present a continuous-wave lock-in-based technique able to reach high sensitivity in temperature measurement at microscale or nanoscale volumes (4.8 mK/Hz 1/2 in μm 3). Furthermore, the present method has the advantage of being insensitive to environmental magnetic noise that in general introduces a bias in the temperature measurement.