The quantitative calculation of mechanical wave propagation in the solidification of metal is difficult because of the complicated structure of melt in the solidification process. In this study, the Kelvin model is used to describe the viscoelastic characteristics of alloy melt, and the thermoviscoelastic wave equations are established in conjunction with continuity equation, momentum equation, energy equation considering thermo-mechanical effect and constitutive equation considering thermal stress. The difference equation of thermoviscoelastic wave in the variable non-uniform temperature field is built by using the implicit finite difference method of second order in space and first order in time, and taking into account the variable temperature and non-uniformity of melt. The difference equation is solved numerically by taking the thermodynamic parameters of ZL203A alloy in solid-liquid region varying with temperature as calculation parameters, and the propagation law of thermoviscoelastic wave in the inhomogeneous alloy melt with varying temperature is obtained. By comparing the propagation law of the wave with same wavelength in elastic medium with that in viscoelastic medium, it is found that the thermoviscoelastic wave attenuates seriously, and the thermoelastic wave has no attenuation. The step of displacement of thermoviscoelastic wave will be smoothed rapidly during propagation. The comparison among propagations of thermoviscoelastic wave in homogeneous medium at different temperatures shows that the wavelength of thermoviscoelastic wave in high temperature melt is smaller and the attenuation is more serious than in low temperature melt. The propagation of thermoviscoelastic wave in inhomogeneous medium is equivalent to the propagation in layered medium with different impedance, which makes the attenuation more serious than in homogeneous medium. When the thermoviscoelastic wave propagates from the low temperature region to the high one, the distribution of inhomogeneous temperature field has a great influence on the propagation of wave. The smaller the slope of the temperature field at the incidence of the wave, the smaller the attenuation of the wave is, and the farther the propagation distance is, conversely, when the wave propagates from the high temperature region to the low one, the distribution of the inhomogeneous temperature field has little influence on the propagation of wave. The calculation results of attenuation coefficients of thermoviscoelastic wave with different frequencies at different temperatures show that the attenuation coefficients of thermoviscoelastic waves in alloy melt are bigger in the high temperature medium than in the low temperature medium, and it increases linearly with the frequency increasing. The attenuation coefficient first increases and then decreases with temperature increasing, and reaches a maximum value at the coherency temperature.