We present a class of models in the framework of gauge mediation supersymmetry breaking where the standard model is supplemented by additional U(1) symmetry which acts only on the third generation fermions. The messenger fields carry a nontrivial U(1) charge and are vectorlike particles under this symmetry. This leads to additional contributions to the soft supersymmetry breaking mass terms for the third-generation squarks and sleptons. In this framework we show that the muon g - 2 anomaly, the observed 125 GeV Higgs boson mass and the detected relic dark matter abundance (gravitino in our case) can be simultaneously accommodated. The resolution of the muon g - 2 anomaly, in particular, yields the result that masses of squarks in the first two families, as well the gluino mass, should be less than or similar to 2.5 TeV, which will be tested at LHC14.