Immobilizing ultrafine high-entropy Pt alloy nanocrystals (HENs) in porous carbon (PC) with strong interface interaction, which is crucial to efficient and durable oxygen reduction reaction (ORR), remains a challenge. In this work, an anchoring-carbonization strategy for strongly bonding sub-3 nm HENs in ordered mesoporous carbon is reported. When heating the orderly assembled composites containing hydrophobic organometallic precursors, structure directing agent F127, and hydrophilic resol, F127 is first removed at moderate temperature region, leading to reduced metallic species directly anchored on partially carbonized resol framework. Then along further temperature increase, in situ carbonization of resol around the HENs, enables more effective plane bonding rather than a single point contact of HENs with carbon. It not only enhances the anchor strength, but also inhibits migration and size growth of HENs along the subsequent high-temperature carbonization. As a result, senary, septenary, octonary, and denary Pt-based HENs with average nanocrystal sizes of 2.2, 2.6, 2.9, and 2.8 nm, respectively, are successfully imbedded into porous carbon. In electrocatalytic ORR, porous carbon-supported senary Pt-based HENs (6-HENs/PC) exhibit superior activity and durability, representing a promising electrocatalyst. This strategy allows for the preparation of a range of ultrafine HENs strongly loaded on porous carbon for wide applications.