Little is known about the effect of statin use in lung cancer development in idiopathic pulmonary fibrosis (IPF). We analyzed the database of the National Health Insurance Service to further investigate the clinical impacts of statin on lung cancer development and overall survival (OS) in IPF patients. The analysis included 9,182 individuals diagnosed with IPF, of which 3,372 (36.7%) were statin users. Compared to statin non-users, the time from diagnosis of IPF to lung cancer development and OS were longer in statin users in IPF patients. In Cox proportional hazard regression models, higher statin compliance, statin use, and being female had an inverse association with lung cancer risk, while older age at diagnosis of IPF and smoking history were associated with higher risk of lung cancer in IPF patients. For OS, statin use, female sex, higher physical activity frequency, and diabetes were associated with longer survival. In contrast, older age at diagnosis of IPF and smoking history were associated with shorter OS in IPF patients. These data from a large population indicate that statin had an independent protective association with lung cancer development and mortality in IPF patients.