At the 1921 election to Dáil Éireann, Maguire was returned unopposed as Teachta Dála (TD) for Mayo South–Roscommon South as a Sinn Féin candidate. He opposed the Anglo-Irish Treaty, and apart from saying "Níl" ("No" in English) when the vote was called, did not participate in any substantial way in the Dáil treaty debates. He was returned unopposed at the 1922 general election. At the 1923 general election, Maguire faced a contest and succeeded in securing the second of five seats in the Mayo South constituency, winning 5,712 votes (17.8%). He was a member of the anti-Treaty IRA executive which commanded rebel troops during the Irish Civil War. Maguire was captured by the National Army while in bed and was told that he would be executed, but his life was spared. While in prison his brother, Sean Maguire, aged 17, was executed by the government.