We establish the existence of ergodic measures of maximal Hausdorff dimension for hyperbolic sets of surface diffeomorphisms. This is a dimension-theoretical version of the existence of ergodic measures of maximal entropy. The crucial difference is that while the entropy map is upper-semicontinuous, the map ν↦ dimHν is neither upper-semicontinuous nor lower-semicontinuous. This forces us to develop a new approach, which is based on the thermodynamic formalism. Remarkably, for a generic diffeomorphism with a hyperbolic set, there exists an ergodic measure of maximal Hausdorff dimension in a particular two-parameter family of equilibrium measures.