The Late Cretaceous-Paleogene magmatism in the Baoshan block of the western Yunnan represents a significant magmatic event relating to the Neo-Tethys evolution. The petrogenesis, magma source and geodynamic setting of the granitoids are still constrained loosely. In this paper, the bulk geochemistry, zircon U-Pb dating and Hf isotopic compositions of the granites from the Caojian area in the northern part of Baoshan block are reported. The zircon U-Pb age of two granite samples are 73. 32 +/- 0. 19Ma (MSWD = 0. 68) and 73.44 +/- 0. 20Ma (MSWD = 1. 3), respectively. Caojian granites are characterized by high silica (SiO2 = 73. 76% similar to 74. 74%), alkali-rich (K2O + Na2O = 8. 14% similar to 8. 62%), peraluminous (A/CNK = 1. 15 similar to 1. 23) and shoshonitic. These samples are distinctively enriched in Rb, U, Th and other large-ion lithophile element and Pb, but depleted in high field-strength elements of Nb, Ta, Ti. They show strong fractionation between LREE and HREE (LREE/HREE = 8. 5 similar to 15. 1), with obvious negative Eu anomalies (delta Eu = 0. 29 similar to 0. 43) in the chondrite-normalized REE patterns. Their zircons have concentrated negative epsilon(Hf) (t) values (-5. 0 to -3. 5) and Hf isotopic crust model ages (t(DM)(C) = 1352 similar to 1496Ma). These geochemical characteristics and Hf isotopic compositions suggest that the Caojian granites are S-type granite, which were possibly derived from anatexis of Mesoproterozoic crustal basement materials of Baoshan block, mainly clay-rich pelite. All samples plot the group of syn-collisional area in the tectonic setting discrimination diagrams. The peraluminous granites in Baoshan block can be divided into three stages based on the age distribution, the 85 similar to 83Ma, 73Ma and 66 similar to 60Ma. It is indicated that the successive crustal extension and decompression in Late Cretaceous to Paleocene of Baoshan block. According to the regional tectonic setting, we suggest the following evolution process: (1) In the Early Cretaceous, the closure of Meso-Tethy ocean caused the crustal thickening in the west side of Baoshan block; (2) In the Late Cretaceous, granites from Caojian area could be produced by decompression melting of the thickened crust of Baoshan block, and the decompression melting probably due to trench retreat in the process of the northward subduction of the Neo-Tethys. Comprehensive comparison of the Late Cretaceous zircon Hf isotopic data of the granites from Baoshan block with the contemporary granites from the southern part of Lhasa block and Tengchong block suggesting they are obviously different in basement attribution.