Experiments observed preferential He bubble formation in carbide precipitates M23C6 during low-temperature He irradiation in ferritic-martensitic steels. However, the process and mechanism of He trapping in M23C6 present a challenge to measure. Using density functional theory, we have systematically investigated He distribution, migration, and accumulation in Cr23C6. The formation energies of interstitial and substitutional He in Cr23C6 are 3.50 and 3.16 eV, respectively, remarkably lower than those in Fe matrix. The higher solubility of He in Cr23C6 makes it an He-trapping center in martensitic steels. On the other hand, the migration barrier of interstitial He in Cr23C6 is 2.58 eV, about 2.52 eV higher than that in bulk Fe. Furthermore, we only find a very weak attraction potency for substitutional-interstitial He pair, 0.25 eV, and even no binding trend for interstitial-interstitial or substitutional-substitutional He pairs, which suggests that it is more difficult for He atoms to move and less powerful driving force to accumulate in Cr23C6 than those in Fe matrix. Our results indicate that the trapping effect results from a lower charge density zone in Cr23C6, and predict that the small and dense Cr23C6 particles may hinder bubble growth at the initial stage, which can improve the resistance to irradiation void swelling.