Ernie O'Malley rose to the rank of Assistant Chief of Staff of the IRA in control of the Northern (Ulster) and Eastern (Leinster) Commands. He was arrested during a shoot-out in November 1922 in which he was shot several times and very badly wounded. It has been suggested that had Ernie O'Malley not been so critically ill following his arrest, it is likely he would have been executed. As it was he gradually recuperated during two years of imprisonment, though he retained bullet fragments in his body for the rest of his life.
In the 1923 general election Ernie O'Malley stood as a candidate in the Dublin North constituency in which Mountjoy jail stood. He was duly elected but never took his seat in the Dáil, which would have required him to take an Oath of Allegiance to the British Crown. Two months later and with some twelve thousand Republicans held in jail following an anti-Treaty ceasefire, Republican prisoners began a hunger strike in support of their pleas for unconditional release from jail. O'Malley joined the hunger strike, holding out for 41 days until the strike was called off. Ernie O'Malley was released from prison in July 1924, one of the last Republican prisoners to be freed.
Following the defeat of the anti-Treaty faction in the Civil War, Ernie O'Malley spent most of the next two years travelling Europe, recuperating from the effects of his wounds and the hunger strike as well as developing his intellectual interests. He visited art galleries in Spain, Italy and France, and on his return enrolled again as a medical student at UCD in Autumn 1926. Again he failed his second year exams, though his legacy to the University was the establishment of UCD's Dramatic Club.
In 1928 Ernie O'Malley travelled to the U.S., initially on a fund-raising trip for the new Irish newspaper, the Irish Press. In California he met the family of Irish actor Peter Golden and with them travelled to the thriving bohemian community at Taos, New Mexico. Staying in Taos as tutor to the Golden children, Ernie began writing his memoirs and some poetry, immersing himself in the artistic environment. Novelist D.H. Lawrence had lived in Taos, and artist Georgia O'Keefe was living nearby in Abiquiu, New Mexico. O'Malley also travelled to Mexico, becoming a firm friend of the American poet Hart Crane and beginning a lifelong acquaintance with the photographer Paul Strand. On travelling to New York in 1932 O'Malley was introduced to the Yaddo Corporation, a country house retreat for artists, writers and composers. In its time Yaddo residents have included James Baldwin, Truman Capote, Saul Bellow, Sylvia Plath and Alice Walker. O'Malley stayed at Yaddo for six weeks, working on his memoirs.
In 1933 Ernie O'Malley was introduced to Helen Huntington Hooker, daughter of a wealthy Connecticut businessman. Helen was an aspiring sculptor, and was immediately attracted to the engaging Irishman with his daring tales of the Revolution. At this time O'Malley spent four months in Chicago as an Irish representative at the World's Fair and, returning to New York, also worked at the New York Public Library on Old and Middle Irish. Despite his itinerant lifestyle, Ernie O'Malley continued to mix in bohemian circles through his friendship with Paul Strand and links with the Alfred Stieglitz/Georgia O'Keefe circle.