Ionic codoping offers a powerful approach for modifying material properties by extending the selection of potential dopant ions. However, it has been a major challenge to introduce certain ions that have hitherto proved difficult to use as dopants (called "difficult-dopants") into crystal structures at high concentrations, especially through wet chemical synthesis. Furthermore, the lack of a fundamental understanding of how codopants are incorporated into host materials, which types of defect structures they form in the equilibrium state, and what roles they play in material performance, has seriously hindered the rational design and development of promising codoped materials. Here we take In3+ (difficult-dopants) and Nb5+ (easy-dopants) codoped anatase TiO2 nanocrystals as an example and investigate the doping mechanism of these two different types of metal ions, the defect formation, and their associated impacts on high-pressure induced structural transition behaviors. It is experimentally demonstrated that the dual mechanisms of nucleation and diffusion doping are responsible for the synergic incorporation of these two dopants and theoretically evidenced that the defect structures created by the introduced In3+, Nb5+ codopants, their resultant Ti3+, and oxygen vacancies are locally composed of both defect clusters and equivalent defect pairs. These formed local defect structures then act as nucleation centers of baddeleyite- and α-PbO2-like metastable polymorphic phases and induce the abnormal trans-regime structural transition of codoped anatase TiO2 nanocrystals under high pressure. This work thus suggests an effective strategy to design and synthesize codoped nanocrystals with highly concentrated difficult-dopants. It also unveils the significance of local defect structures on material properties.