I consider the effects of firms’ connections to state attorneys general in the US. Legal investigations and penalties can pose a considerable risk and uncertainty for firms, and there is anecdotal evidence that political connections to the judicial branch may contribute to lowering such risk. Yet, extant literature has not focused on connections to that branch of government. I leverage state-level campaign contribution data and employ a regression discontinuity design around state attorneys general elections to provide suggestive evidence that political connections lead to lower investigation probabilities and lower penalties for firms. Moreover, I demonstrate that connections lead to increases in firms’ investments. Thus, I shed light on a new channel for firms’ political activities, and show that connections to the judicial branch entails private benefits for companies. The observed investment effects may be inefficient as capital may be misallocated across firms.