A method to measure the deflection of a nanotube cantilever with nanometer accuracy in an air or liquid environment is presented. We attached fluorescent dyes at the end of a nanotube to detect its deflection. The nanotube cantilever was fabricated with a multiwalled carbon nanotube that is attached to the end of an electrochemically etched tungsten tip, and it was imaged in an epifluorescence microscope system. The fluorescence intensity distribution of the fluorescent particles at the end of the nanotube was approximated with a Gaussian and fitted by least-squares method. Finally, we were able to measure the displacement of the nanotube cantilever during electrostatic actuation with positional accuracy of a few nanometers. This technique can be applied to a manipulator or a force transducer on related a few piconewton forces.