PurposeThe primary objective of introducing nonstate ownership into state-owned enterprises (SOEs) is to enhance corporate performance. This study explores how nonstate ownership affects corporate performance, emphasizing agency costs as the primary mechanism.Design/methodology/approachUsing data from 2010 to 2019 for listed SOEs, the authors measure nonstate ownership based on shareholding ratios, control rights and shareholding–control matching. The authors also use fixed-effects and mediation-effects models, with agency costs as the primary mechanism.FindingsIncreased nonstate shareholding ratios, stronger control rights and improved shareholding–control matching promote SOE performance. Nonstate shareholding ratios boost performance through resource effects, while control rights and shareholding–control matching promote performance by mitigating agency costs. A heterogeneity analysis indicates stronger effects in local SOEs and highly marketized regions. Moreover, control rights and shareholding–control matching reinforce the positive impact of shareholding ratios on performance.Originality/valueThe mixed-ownership reform of Chinese SOEs aims to optimize shareholding and control structures between state and nonstate shareholders. Therefore, research on the impact of nonstate shareholding ratios, control rights and shareholding–control matching on corporate performance is highly pertinent. However, existing studies have focused on the effects of single factors on performance, without exploration of the economic implications of shareholding–control matching. This study not only prioritizes the optimization of shareholding and control structures but also underscores the importance of granting nonstate shareholders control rights proportionate to their shareholding, providing critical evidence of the value of improving SOEs' ownership structure.