Microcantilever with integrated piezoresistor has been applied to in situ surface stress measurement in the field of biochemical sensors. It is well known that piezoresistive cantilever-based sensors are sensitive to ambient temperature changing due to highly temperature-dependent piezoresistive effect and mismatch in thermal expansion of composite materials. This paper proposes a novel method of temperature drift compensation for microcantilever-based sensors with a piezoresistive full Wheatstone bridge integrated at the clamped ends by subtracting the amplified output voltage of the reference cantilever from the output voltage of the sensing cantilever through a simple temperature compensating circuit. Experiments show that the temperature drift of microcantilever sensors can be significantly reduced by the method.