The invention relates to a truncated human papillomavirus (HPV) 45 type L1 protein and a coded sequence and a preparation method thereof, and virus-like particles containing the protein, wherein the protein and the virus-like particles can be used for preventing HPV (particularly HPV45) infection and diseases such as cervical cancer and the like caused by the HPV (particularly HPV45) infection. The invention further relates to an application of the protein and the virus-like particles in preparation of a pharmaceutical composition or a vaccine, wherein the pharmaceutical composition or the vaccine is used for preventing the HPV (particularly HPV45) infection and the diseases such as cervical cancer and the like caused by the HPV (particularly HPV45) infection.