The invention discloses a method for blasting and excavating a dam foundation and a rock foundation. The method comprises the steps of step 1, drilling blast holes, and paving buffer layers at the bottom parts of the blast holes; step 2, vertically installing energy dissipation seats on the buffer layers, and filling explosive, wherein the energy dissipation seats are prepared by adopting concrete, the concrete is formed by cement, water, iron sand, superplasticizer and gel, the water-cement ratio is 0.24-0.28, the mass ratio of the iron sand and the cement is (1.6-3.0):1, and the mass of the superplasticizer is 1.0%-2.0% of that of the cement; step 3, blasting through a detonator. The method disclosed by the invention has the advantages that the operation is quick and convenient, the construction cost is low, the blast shock waves are reflected for multiple times through the energy dissipation seats, the energy of the blast shock waves is induced to gather in the horizontal direction, the full crushing of rock bodies between adjacent blast holes can be realized, the blasting efficiency can be further increased, meanwhile, the damage to the bottom parts of the blast holes can be further reduced, and the flatness of an excavation surface is increased.