Introducing a leptonic U(1) gauge symmetry, we try to reproduce the gap in the cosmic neutrino spectrum reported by the IceCube collaboration, and at the same time, make an additional contribution to the muon anomalous magnetic moment, which fills the gap between the standard model prediction and the experimental observation.