Objectives: To compare mortality risk and life expectancy among individuals with different sleep durations and sleeping pill use. Methods: A cohort of 484,916 community-dwelling adults in Taiwan was recruited into a health screening program from 1994 to 2011. Subjects were categorized by daily sleep duration into 4 groups: extremely short (<4 hours), short (4-6 hours), medium (6-8 hours), and long (>8 hours). Cox proportional hazards models were used to investigate the associations of mortality risk with sleep duration and sleeping pill use. Models were adjusted for sociodemographic characteristics, lifestyle, and comorbidities. Life expectancy tables were calculated among sleeping pill users and nonusers with different sleep durations. Results: With 6- 8 hours of daily sleep, sleeping pill nonusers had the lowest mortality risk. Sleeping pill users, even with this optimal amount of sleep, had a 55% (p < .001, 95% CI, 1.38-1.73) higher mortality risk than nonusers. The life expectancy of 30-year-old male sleeping pill users with extremely short or long sleep durations was 12-13 years shorter than sleeping pill nonusers who had 6-8 hours of sleep. On average, life expectancy in individuals using sleeping pills (vs. nonusers) was shorter by 5.3 (95% CI, 4.10-6.32) years in men and 5.7 (95% CI, 5.28-7.98) years in women. Conclusions: This study suggests that the use of sleeping pills is associated with an increased risk of mortality and shortened life expectancy, especially in extreme sleepers. Regular users should be aware of potential harms from sleeping pills.