Context. Thanks to the outstanding capabilites of the HS T , our current knowledge about the M31 globular clusters (GCs) is similar to our knowledge of the Milky Way GCs in the 1960s-1970s, which set the basis for studying the halo and galaxy formation using these objects as tracers, and established their importance in defining the cosmic distance scale. Aims. We intend to derive a new calibration of the M V (HB)-[Fe/H] relation by exploiting the large photometric database of old GCs in M31 in the HS T archive. Methods. We collected the BVI data for 48 old GCs in M31 and analysed them by applying the same methods and procedures to all objects. We obtained a set of homogeneous colour-magnitude diagrams (CMDs) that were best-fitted with the fiducial CMD ridge lines of selected Milky Way template GCs. Reddening, metallicity, Horizontal Branch (HB) luminosity and distance were determined self-consistently for each cluster. Results. There are three main results of this study: i) the relation M V (HB)=0.25(±0.02)[Fe/H]+0.89(±0.03), which is obtained from the above parameters and is calibrated on the distances of the template Galactic GCs; ii) the distance modulus to M31 of (m-M) 0 =24.42±0.06 mag, obtained by normalising this relation at the reference value of [Fe/H]=-1.5 to a similar relation using V 0 (HB). This is the first determination of the distance to M31 based on the characteristics of its GC system which is calibrated on Galactic GCs; iii) the distance to the Large Magellanic Cloud (LMC), which is estimated to be 18.54±0.07 mag as a consequence of the previous results. These values agree excellently with the most recent estimate based on HS T parallaxes of Galactic Cepheid and RR Lyrae stars, as well as with recent methods.