This study investigates the effect of capital structure on profitability and examines whether liquidity and firm size moderate the relationship in pharmaceutical companies listed on the Indonesia Stock Exchange during 2020–2024. Using a quantitative research design, the study analyzes balanced panel data from 10 pharmaceutical firms, resulting in 50 firm-year observations. Capital structure is measured by the Debt-to-Equity Ratio (DER), profitability by Return on Assets (ROA), liquidity by the Current Ratio (CR), and firm size by the natural logarithm of total assets (SIZE). The data were analyzed using the Fixed Effect Model (FEM) and Moderated Regression Analysis (MRA). The findings reveal that capital structure does not significantly affect profitability (p = 0.0849). In addition, liquidity does not moderate the relationship between capital structure and profitability (p = 0.5616). However, firm size significantly moderates the relationship (p = 0.0248), with a negative interaction coefficient, indicating that the influence of capital structure on profitability becomes weaker as firm size increases. These results suggest that debt financing is not the primary driver of profitability in pharmaceutical firms, particularly in the post-pandemic business environment. This study extends the capital structure literature by highlighting firm size as a significant contingency factor that shapes the effectiveness of leverage in improving profitability. The findings provide valuable insights for managers in formulating financing policies and for investors in evaluating the financial performance of pharmaceutical companies.