PurposeThis study aims to investigate the impact of corporate social responsibility (CSR) on the cost of debt (CoD). In this CSR-CoD relationship, the significance of insider and institutional ownership is also examined.Design/methodology/approachThe research sample consists of 145 non-financial companies listed on the Pakistan Stock Exchange between 2010 and 2021. The level of a firm's participation in CSR-related activities is measured through multidimensional financial methodology, whereas CoD is the ratio of interest expenses to average interest-bearing debt outstanding.FindingsThe result of fixed effect model, based on the Hausman test, demonstrates that CSR has a negative impact on CoD, which supports the risk mitigation hypothesis and the stakeholder's perspective of CSR. Insider ownership has an insignificant effect on CoD, confirming the management entrenchment hypothesis; nevertheless, institutional ownership has a significant positive impact on CoD, supporting the shareholder's conflict argument. Finally, insider and institutional ownership interaction has no statistically significant effect on the CSR-CoD connection, favoring neither corporate governance's complementing nor substitutive impacts. The results are subject to robustness by using various economic methodologies and alternative measurements of CSR.Practical implicationsThe study's findings will assist regulatory authorities, investors, financial analysts and other stakeholders in better understanding the CSR-CoD relationship and the role of insider and institutional ownership in that relationship.Originality/valueThe literature contains very little research on the impact of CSR on COD. To the best of the authors' knowledge, this is the first study in an emerging market to experimentally assess this relationship and analyze the impact of insider and institutional ownership in this relationship.