A unified description of the relationship between the Hamiltonian structure of a large class of integrable hierarchies of equations and W-algebras is discussed. The main result is an explicit formula showing that the former can be understood as a deformation of the latter.