Insurance companies and pension funds which deal with human lifetime are interested in mortality forecasting to minimize the longevity risk. In this paper, we studied the mortality forecasting model based on the age-specific death rates by the usage of the state-space framework and Kalman filtering technique. To capture the volatility of time, the time varying trend has been added to the Lee-Carter (LC) model, which is the benchmark methodology in modeling and forecasting mortality since it was introduced in 1992. So, this model is a random walk with time varying drift (TV). We illustrated the performance of the proposed model using Iranian mortality data over the period 1950–2015. Numerical results show that, both models have good fitness and are tangent. So the TV model acts as well as the LC model, but the TV model has the advantages of fewer calculations and the time-varying drift which can be beneficial in time varying data sets.