PurposeThis study aims to examine how corporate financial flexibility, financial sector development and the regulatory environment influence corporate investment decisions in an emerging economy after controlling for several macroeconomic factors.Design/methodology/approachThe authors estimated random-effects models to empirically examine the impacts of corporate financial flexibility, banking sector development, equity market development, regulatory quality and corruption on corporate investment decisions. The empirical analysis is based on an unbalanced annual panel data set of a sample of 198 non-financial firms listed on the Pakistan Stock Exchange for the period 1992–2018.FindingsThe results show that financially flexible firms tend to invest more. The increased banking sector development, stock market development and better regulatory quality play a pivotal role for enabling firms to increase their investment ability. However, the results reveal that corruption acts as a barrier and reduces corporate investments during the examined period. The results suggest that unused borrowing capacity is a good source of financial flexibility. These results strongly support the pecking order theory, which explains why firms incline toward internal sources for financing their investments and why they prefer debt to equity when go for external financing.Practical implicationsThe empirical findings of the study enable corporate managers to make better financing and investment decisions by understanding the significance of the attainment and maintenance of the corporate financial flexibility to enhance firm value. Furthermore, the findings enable corporate managers to examine and understand the role of banking sector development (BSD), equity market development (EMD), regulatory quality and the role of corruption in affecting corporate firms' investment ability, allowing them to make appropriate investment decisions, especially from an emerging economy perspective. The findings also help investors in making appropriate investment decisions while they are purchasing financial assets. Finally, the findings of the study have some implications for regulators as well. Specifically, the findings suggest that the authorities should implement economic and financial policies favoring banking sector as well as equity market development to enhance corporate investment.Originality/valueThe study significantly adds to the literature by examining the impact of financial flexibility, financial sector development and regulatory environment on corporate investment decisions. According to the authors' knowledge, the empirical evidence examining the impact of all of these factors on corporate investment is very scarce. Therefore, this study is an effort to fill the gap left in the literature.