Keenan was elected to parliament at the 2004 federal election, defeating the incumbent Labor member Jann McFarlane. He was promoted to the Shadow ministry after the 2007 election, serving as Shadow Assistant Treasurer (2007–2008), Shadow Minister for Employment and Workplace Relations (2009–2009), and finally Shadow Minister for Justice, Customs and Border Protection (2009–13). He was identified by the media as a supporter of Malcolm Turnbull in the 2009 leadership spill.