This study delves into the effects of crude oil and gas prices on the United States’ (US) conventional, Islamic, and environmental, social, and governance (ESG) stock indices from January 2013 to December 2022. Decomposing original time series data to minimise inherent fluctuations and using the Quantile-on-Quantile (QQ) regression approach presents a nuanced view of how these energy prices impact different stock indices. The findings reveal that crude oil prices have a variable impact on the indices: high prices negatively influence the indices, low prices have a positive effect, and moderate prices yield a moderate positive impact. After data decomposition, this positive influence diminishes in higher quantiles, indicating an emerging neutral effect in stabilised conditions. In contrast, gas prices show a limited impact, with high prices slightly benefiting conventional and ESG indices but less so for the Islamic index. This suggests a more pronounced influence of oil prices on the indices, likely due to the dependence of many listed companies on oil. The study emphasises the importance of considering oil-related risks in investment strategies and highlights the asymmetric impact of crude oil prices on the US stock indices. These findings have significant implications for investors and policymakers. They underscore the need for careful consideration of oil price dynamics in investment decisions and the importance of staying vigilant against shifts in oil prices that could lead to market instability.