The goal of this paper is to characterize the local sharp estimate $$(I_{\rho } f)^{\#}(x) \le C \, M_{\rho } f(x)$$ and by using this inequality to get necessary and sufficient conditions on the triple functions $$(\varphi , \rho , \omega )$$ which satisfy the equivalence of norms of the generalized fractional integral operator $$I_{\rho }$$ and the generalized fractional maximal operator $$M_{\rho }$$ on the generalized weighted Morrey spaces $${\mathcal {M}}_{p,\varphi }({\mathbb {R}}^{n},\omega )$$ and generalized weighted central Morrey spaces $$\dot{{\mathcal {M}}}_{p,\varphi }({{\mathbb {R}}}^n,\omega )$$ , when $$\omega \in A_{\infty }$$ -Muckenhoupt class.