There are several ways to handle within-subject correlations with a longitudinal discrete outcome, such as mortality. The most frequently used models are either marginal or random-effects types. This paper deals with a random-effects-based approach. We propose a nonparametric regression model having time-varying mixed effects for longitudinal cancer mortality data. The time-varying mixed effects in the proposed model are estimated by combining kernel-smoothing techniques and a growth-curve model. As an illustration based on real data, we apply the proposed method to a set of prefecture-specific data on mortality from large-bowel cancer in Japan.