O'Brien served as Minister for Gaming, Minister for Consumer Affairs and Minister for Energy and Resources in the Baillieu government from 2010 to 2013, and was promoted to Treasurer in the 2013–2014 Napthine government. Following the defeat of the Napthine government at the 2014 state election, O'Brien contested the leadership of the Liberal Party, but was defeated by Matthew Guy. Guy resigned the party leadership following the party's defeat at the 2018 state election. Subsequently, on 6 December 2018, O'Brien was elected leader of the Liberal Party and became Opposition Leader.