He was deputy governor (and effectively in charge) of Mountjoy Prison during the Irish Civil War of 1922–1923, where he was popular with the prisoners, despite being on the opposing side. In his vivid civil war memoir, "The Gates Flew Open", Peadar O'Donnell devotes a chapter to how O'Keeffe was relentlessly mocked by the prisoners who called him 'Paudeen.' He was assistant clerk of Seanad Éireann from 1938 until his retirement in 1947.