We propose a novel optical probe for surface profile measurement of optical surfaces. This probe uses a laser beam to measure local slopes of a surface and obtains the surface profile through numerical integration of the measured slopes. Slope measurement is based on a new angle measurement method, namely, angle measurement based on the internal-reflection effect (AMIRE). The probe is a high-resolution (0.1-arcsec), compact (80x60x40 mm) device with a simple measurement principle. For surface profile measurement, the probe is installed on a coordinate measuring machine (CMM), which provides the necessary scanning motion. A commercial laser interferometer is used to measure the rotational error of the CMM in real time. The result is subtracted from the slope data collected by the probe for error compensation. Measurement results of a spherical mirror are presented that show a nanometer-order resolution in surface profile measurement.