Numerous researchers acknowledge that the occupational pension protects employees. However, in China, the total cost of occupational pensions is shared between employees and employers, representing a significant financial commitment. This study aimed to explore the effect of the occupational pension on corporate social responsibility (CSR) and organizational resilience. Drawing on insights from cost-stickiness and resource-based theories, we developed a model that elucidated the influence of occupational pensions on firms’ approaches to CSR within the context of COVID-19 and how this, in turn, impacted organizational resilience. This study categorized CSR into strategic and responsive activities, employing the concept of cost stickiness as a framework. We analyzed a sample of 34,145 observations from Chinese A-share listed companies spanning the period 2010–2023 to examine the influence of occupational pension adjustments on CSR strategies. The findings of this study revealed that the cost pressure associated with contributions to occupational pensions prompted firms to decrease their engagement in responsive CSR activities while enhancing their strategic CSR initiatives. Furthermore, it was observed that strategic CSR contributed to improved organizational resilience, whereas responsive CSR did not exhibit the same effect. The relationship between occupational pension contributions and CSR was found to be significantly and negatively moderated by factors such as the minimum wage and population aging. Conversely, the relationship between CSR and organizational resilience was significantly and positively moderated by digital transformation and marketing capabilities.