We investigate the mass–metallicity relation and its dependence on galaxy physical properties with a sample of 703 Lyman-break analogues (LBAs) in local Universe, which have similar properties to high-redshift star-forming galaxies. The sample is selected according to Hα luminosity, L(Hα) > 1041.8 erg s−1, and surface brightness, I(Hα) > 1040.5 erg s−1 kpc−2, criteria. The mass–metallicity relation of LBAs harmoniously agrees with that of star-forming galaxies at z ∼ 1.4–1.7 in stellar mass range of 108.5 M⊙ < M★ < 1011 M⊙. The relation between stellar mass, metallicity and star formation rate of our sample is roughly consistent with the local fundamental metallicity relation. We find that the mass–metallicity relation shows a strong correlation with the 4000 Å break; galaxies with higher 4000 Å break typically have higher metallicity at a fixed mass, by 0.06 dex in average. This trend is independent of the methodology of metallicity. We also use the metallicity estimated by Te-method to confirm it. The scatter in mass–metallicity relation can be reduced from 0.091 to 0.077 dex by a three-dimensional relation between stellar mass, metallicity and 4000 Å break. The reduction of scatter in mass–metallicity relation suggests that the galaxy stellar age plays an important role as the second parameter in the mass–metallicity relation of LBAs.