Fermat–Wiener index based on topological Wiener index is the total sum of Fermat distance over all the triplets for vertices. In this paper, we construct a class of hierarchical graphs based on hierarchical product generalized from Cartesian product. We study some critical properties of the hierarchical networks by investigating its topological indices. Applying the finite pattern method, we analytically deduce the dominant term of average Fermat distance and obtain its asymptotic formula, which implies small-world property. We finally exhibit a close connection between Fermat–Wiener index and related graph invariants like average geodesic distance, Wiener index and eigenvalues of Laplacian matrix.