We propose an extended 2HDM with Q6×Z4×Z2 symmetry that can successfully accommodate the SM fermion mass and mixing hierarchy. The tiny masses of the active neutrinos are generated from a type-I seesaw mechanism mediated by very heavy right-handed Majorana neutrinos. The model gives a natural explanation of the charged lepton mass hierarchy. Besides that, the experimental values of the physical observables of the neutrino sector: the neutrino mass squared splittings, the leptonic mixing angles and the leptonic Dirac CP violating phase, are also successfully reproduced for both normal and inverted neutrino mass hierarchies. We find a feasible range of values for the leptonic Dirac CP phase to be in the ranges δCP∈(305.90,348.70)∘ for normal ordering and δCP∈(308.00,348.00)∘ for inverted ordering, which is consistent with the 3σ experimentally allowed limits. The sum of neutrino masses is obtained as ∑mi∈(58.03,60.51) meV for normal ordering and ∑mi∈(98.07,101.40) meV for inverted ordering which are well consistent with all the recent limits. In addition, the obtained ranges for the effective neutrino masses are 〈mee〉∈(3.80,4.38) meV, mβ∈(8.53,9.34)meV for normal ordering and 〈mee〉∈(47.85,49.58) meV, mβ∈(48.39,50.09)meV for inverted ordering which are in agreement with the recent experimental bounds. For the quark sector, the derived results are also in agreement with the recent data on the quark masses and mixing angles. The model under consideration can also accommodate the muon anomalous magnetic moment.