We investigate the corresponding relation between $f(R)$ gravity and holographic dark energy. We introduce a kind of energy density from $f(R)$ which has role of the same as holographic dark energy. We obtain the differential equation that specify the evolution of the introduced energy density parameter based on varying gravitational constant. We find out a relation for the equation of state parameter to low redshifts which containing varying $G$ correction.