Atomic force microscopy(1) (AFM) is a powerful tool for analysing the shapes of individual molecules and the forces acting on them. AFM-based force spectroscopy provides insights into the structural and energetic dynamics(2-4) of biomolecules by probing the interactions within individual molecules(5,6), or between a surface-bound molecule and a cantilever that carries a complementary binding partner(7-9). Here, we show that an AFM cantilever with an antibody tether can measure the distances between 5-methylcytidine bases in individual DNA strands with a resolution of 4 angstrom, thereby revealing the DNA methylation pattern, which has an important role in the epigenetic control of gene expression. The antibody is able to bind two 5-methylcytidine bases of a surface-immobilized DNA strand, and retracting the cantilever results in a unique rupture signature reflecting the spacing between two tagged bases. This nanomechanical approach might also allow related chemical patterns to be retrieved from biopolymers at the single-molecule level.