Background: Capital structure decisions are among the most fundamental issues in corporate financial management, directly influencing cost of capital, firm value, and long-term investment capacity. In emerging markets such as Indonesia, trade-off theory and pecking order theory do not always yield consistent predictions due to elevated information asymmetry and greater macroeconomic volatility. Objective: This study aims to identify the determinants of capital structure and examine the moderating role of macroeconomic conditions inflation and GDP growth on the relationship between firm-level determinants and leverage among non-financial firms listed on the Indonesia Stock Exchange (IDX) during 2014–2023. Methods: A quantitative explanatory-associative design was applied using balanced panel data from 182 firms selected through purposive sampling, yielding 1,820 firm-year observations. The System GMM estimator was employed to address endogeneity and unobserved heterogeneity inherent in dynamic capital structure models. Results: Profitability (ROA) exerts a significant negative effect on leverage, consistent with pecking order theory, while asset tangibility and firm size positively affect leverage in accordance with trade-off theory. Macroeconomic conditions inflation and GDP growth are confirmed as significant moderators of the firm-level determinant–leverage relationship. Conclusion: Macroeconomic volatility materially alters the sensitivity of leverage to internal firm factors. These findings contribute to the corporate finance literature by integrating macroeconomic moderation into a dynamic capital structure framework within an emerging market context.