To compare the diagnostic efficacy and safety of CT-guided percutaneous core needle biopsy (CNB) and fine-needle aspiration (FNA) for pancreatic lesions. A total of 176 patients with 176 pancreatic lesions who visited our hospital between January 2016 and March 2021 were retrospectively analyzed. They were divided into three groups: FNA group A (<1.5 cm between the lesion and great vessels necessitating FNA), FNA group B, and CNB (the latter two with ≥1.5 cm between the lesion and great vessels necessitating FNA). The sensitivity, specificity, positive predictive value, negative predictive value, accuracy, and postoperative. The statistical analysis was done using Statistical Package for the Social Sciences version 17.0. One hundred and seventy six patient's specimens all met the requirements. There were no statistically significant differences in sensitivity, specificity, positive predictive value, negative predictive value, and accuracy between the CNB group and FNA group B, (P > 0.05). Thirteen samples submitted for genetic testing (5 in CNB group, 4 in each of the FNA groups A and B) all met the standards of next-generation sequencing gene detection. The main complications of these groups included abdominal pain, fever, and hyperamylasemia. CT-guided percutaneous FNA and CNB have similar diagnostic efficacy for pancreatic biopsy. Furthermore, FNA has a wide range of puncture indications and is very safe. Like CNB, the obtained tissue through FNA can be genetically tested to guide clinical treatment.