PurposeTaking hints from the lacunas in the field of ownership structure and corporate social responsibility (CSR) performance of the firms in India, especially when the moderating effect of certain corporate governance mechanism comes into play, this study aims to attempt to fulfill the gap by exploring the ownership structure of the firm (i.e. foreign ownership, institutional ownership and government ownership) and the CSR performance of the firm, when moderated by board independence of the firm. In an additional analysis, the study explores the non-linear effect of foreign ownership structure on the CSR performance in the Indian context.Design/methodology/approachThe study incorporates a strongly balanced panel data set of 280 non-financial National Stock Exchange 500 listed firms for the study period of 2013–2019. The study uses both static and Arellano–Bond dynamic panel model under generalized method of moments (GMMs) framework to establish the relationship between the studied variables.FindingsThe study acknowledges a positive impact of the foreign investors in the CSR performance of Indian firms with a higher proportion of independent directors on the board. The study further finds a contrarian role of government ownership in Indian context among the sampled firms. The study also in its extended analysis finds a non-linear inverted U-shaped relationship between foreign ownership (FO) and the CSR performance, which shows that FO positively impacts the CSR performance until a threshold level of 34% after which the curve starts declining.Practical implicationsOne of the major implications this study provides for the corporate policymakers is that the firms with a string penchant for philanthropic activities such as CSR should be concerned with attracting more foreign investors in their shareholding. Also, a higher proportion of independent directors on the board boost the engagement of the firm in CSR works.Originality/valueThe moderating effect of board independence in the ownership structure–CSR relationship attempted by this study is a rare attempt in a developing economy, such as India, and offers a fresh dimension to the study. Also, the non-linearity relationship between FO and the CSR performance and the threshold level providing the twofold effect of the variables is an innovative research attempt, especially in regard to a developing country like India.