 He did not contest the 1922 general election.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.'