The relationship between sleep duration and cancer in China remains inconclusive. The authors investigated the association between sleep duration and cancer from both static and dynamic perspectives. This study was based on the China Health and Retirement Longitudinal Study. We first tested the hazard ratios (HRs) with 95% confidence intervals (CIs) between baseline sleep duration and incident cancer using Cox proportional hazards regression analysis. Sleep duration trajectories from 2011 to 2015 were identified using group-based trajectory modeling to examine the subsequent risk of incident cancer from 2015 to 2018 using Cox proportional hazards regression model. The risk of incident cancer increased by 69% (HR, 1.69; 95% CI, 1.19-2.39) in individuals who slept for <7h per day (vs. 7 to ≤8h), 41% (HR, 1.41; 95% CI, 1.01-1.95) in those who slept for <6h per night (vs. 6 to ≤8h), and 60% (HR, 1.60; 95% CI, 1.01-2.55) in those who did not take any naps during the day (vs.>60min). Stratified by sex and body mass index, the risk of cancer was evident among women with night sleep of <6h (vs. 6-8h). However, the duration of <7h of total sleep among men and overweight individuals was associated with cancer risk. Moreover, individuals with a short night sleep duration but no napping had a higher risk of cancer. Furthermore, cancer risk was only observed in individuals with short stable trajectory of night sleep (HR, 2.01; 95% CI, 1.07-3.80) and among women with short stable trajectory of total sleep (HR, 2.26; 95% CI, 1.13-4.52). Cancer incidence risk was observed in participants with sleep duration of <7h and among women with short stable sleep trajectory. Short nights and total sleep duration were both associated with a high risk of incident cancer, but varied by sex. Interestingly, cancer risk was restricted to women with short stable sleep trajectory. This study showed that short nights and total sleep duration were associated with a high risk of cancer incidence in middle-aged and elderly Chinese population, with implications for early effective cancer prevention. Habitual sleep is a modifiable and dynamic lifestyle behavior, and long-term short sleep trajectories among women can predict cancer outcomes. Future studies should examine the association between the trajectory of sleep parameters based on objective measures and specific cancer types.