In the original holographic dark energy (HDE) model, the dark energy density is proposed to be
, with c a dimensionless constant characterizing the properties of the HDE. In this work, we propose the generalized holographic dark energy (GHDE) model by considering the parameter c as a redshift-dependent function c(z). We derive all the physical quantities of the GHDE model analytically, and fit the c(z) by trying four kinds of parametrizations. The cosmological constraints of the c(z) are obtained from the joint analysis of the present SNLS3+BAO+CMB+H0 data. We find that, compared with the original HDE model, the GHDE models can provide a better fit to the data. For example, the GHDE model with JBP-type c(z) can reduce the
of the HDE model by 2.16. We also find that, unlike the original HDE model with a phantom-like behavior in the future, the GHDE models can present many more different possibilities, i.e. it allows the GHDE in the future to be either quintessence-like, cosmological constant-like, or phantom-like, depending on the forms of c(z).