The energy sector plays a vital role in the global economy, with increasing sustainability challenges. In this context, corporate social responsibility (CSR) has become one of the important strategies to create sustainable value for companies. This study examines the effect of CSR on firm value in the energy sector in Indonesia, with a focus on the role of political connections as a moderating variable. CSR has become an important strategy in improving corporate image and value, but its effectiveness is often affected by external factors, including political connections. This study uses data from 32 energy companies listed on the Indonesia Stock Exchange (IDX) during the 2019-2022 period. Tests were conducted using moderated regression analysis. The results show that CSR has a significant positive effect on firm value, as measured by Tobin's Q. However, political connections do not have a direct effect on firm value. In contrast, political connections are shown to strengthen the relationship between CSR and firm value. This finding suggests that political connections may provide competitive advantages, such as regulatory ease and fiscal incentives, that support the implementation of CSR. This study contributes to the CSR literature by highlighting the importance of political connections in moderating the effect of CSR in the energy sector. The practical implication of this study is the need for firms to strategically leverage political connections to increase the effectiveness of their CSR programs.