This is due to the 'Anomalous Expansion' of water. Water experiences contraction when cooled but as it reaches a temperature of 4°C, it starts expanding and then freezes into solid ice at 0°C.
Therefore, the water at 4°C has maximum density and minimum volume.
And hence, the specific heat capacity of water is higher than that of ice.
Specific heat capacity of a substance - The amount of heat that can be absorbed by 1 gram of a substance to raise its temperature by 1°C
Because we no water is in liqid    form were as ice in the from of solid