This paper explores the effect of oil price, gross domestic product (GDP), and carbon dioxide (CO2) emissions on renewable energy consumption in China from 1990 to 2020, utilizing the canonical cointegrating regression (CCR) method. The findings indicate that the oil price, GDP and CO2 emissions positively and significantly affect renewable energy consumption over the examined time frame. Numerically, a 1% increase in oil prices, GDP, and CO2 emissions results in a 0.16%, 0.39%, and 1.70% increase in renewable energy consumption, respectively. The positive effect of oil prices on renewable energy consumption can be seen as the cost advantage of renewable energy, which may grow with rising oil prices, leading to a rise in its adoption. The study underscores the significance of promoting renewable energy usage, emphasizing the need for policies that aid energy security and environmental sustainability. © 2024 Elsevier Ltd