A non-universal $U(1)_{X}$ extension to the Standard Model composed of two scalar doublets and two scalar singlets together with three additional quark singlets and two lepton singlets and three generations of right-handed and Majorana neutrinos is made to explain lepton mass hierarchy, neutrino masses via inverse seesaw mechanism and muon anomalous magnetic moment in an anomaly free framework. In the present model, exotic and Standard Model particles acquire mass thanks to vacuum expectation values at different scales, yet the electron and the lightest neutrino are tree level massless but massive at one-loop level. By considering a numerical exploration and under the constraint of the Higgs mass, neutrino mass differences and PMNS matrix, it is found that only contributions due to exotic neutrinos interacting with charged scalars are relevant to muon $g-2$, though they are negative. Thus, the SUSY extension is considered and it is found that muon $g-2$ can be explained by allowing $U(1)_{X}$ vacuum expectation values to lie in the TeV scale thanks to SUSY soft-breaking interactions for at least $sim 10^{5}$ GeV masses. Thus, the contribution due to exotic neutrinos interacting with $W$ gauge bosons is positive and no longer negligible which added to all other contributions might explain the anomaly.