Objective To study the death status of pancreatic cancer among residents in Xuhui district, Shanghai, from 1992 to 2021, and analyze its trends of change, so as to provide evidence for the prevention and treatment of pancreatic cancer. Methods Based on the database of Shanghai death registration system from 1992 to 2021, the crude mortality rate, standardized mortality rate, age-specific mortality rate and other indicators of pancreatic cancer among registered residents in Xuhui district were calculated. The Joinpoint software was used to analyze the trends of average annual percent change (AAPC) of pancreatic cancer mortality rate, and the age-period-cohort model was used to analyze the age effect, period effect and birth cohort effect pairs significant changes in pancreatic cancer mortality. Results In 2021, the mortality rate of pancreatic cancer in Xuhui district, Shanghai, ranked fourth among malignant tumors, and the winning rate and world standard rate of the whole population, males and females were 8.34/100 000 (8.81/100 000, 7.98/100 000) and 7.28/100 000 (7.69/100 000, 6.96/100 000), respectively, with males higher than females. AAPC of crude mortality rate and the standardized (6) mortality rate were higher in males than that in females. The age-specific mortality rate increased with the increase of age, and the highest mortality rate was found in 60-84 years old group. The age-period-cohort model showed that from 1992 to 2021, the annual net shift of pancreatic cancer mortality among the whole population, male and female residents in Xuhui district, Shanghai, was 1.22%, 1.58%, 1.15% (P=0.20, 0.19, 0.45) respectively, and the time trend was not significant. From the perspective of age effect, the risk of death from pancreatic cancer in the whole population and with age deviation in males had an obvious trend with increasing age (P<0.05), while the age effect in females had no obvious trend. From the perspective of period effect, no period deviation was significant in the whole population, males and females (P>0.05). In terms of cohort effects, there were significant differences in the whole population and the male cohort deviations(P<0.05). No significant cohort effect was observed in the female population. Conclusions The mortality rate of pancreatic cancer among registered residents in Xuhui district, Shanghai from 1992 to 2021, was on the rise, especially in the 60-84 years old group and male. The prevention and control of pancreatic cancer needs to develop effective epidemic prevention measures for corresponding populations.