The CID was created by Michael Collins and many of its personnel were former Irish Republican Army fighters whom he had commanded during the Irish War of Independence. In particular, a number came from the Squad, a Dublin-based IRA assassination unit under Collins' command. The unit had close links with the Army Intelligence and with a smaller "Protective Corps" which was based in the same building, Oriel House on Westland Row, Dublin. Initially, they were put under the command of Liam Tobin. On 31 July 1922, it was taken out of the control of military intelligence and put under the brief of TDJoseph McGrath. Its commanding officer was Captain Pat Moynihan. Moynihan was given temporary transfer from his post as Head of Military Intelligence and with the rank of Captain took over Oriel House for this new force. On 22 August 1922 the Criminal Investigation Department was officially formed to "be distinct from existing police forces with separate headquarters under direct control of the Minister for Home Affairs." It was formed from members of the National Army and the Irish Republican Police and was based at Oriel House. It consisted of over 100 heavily armed men and three women detectives who were "cloaked" as typists and "engaged in special duties connected with the detection of women engaged in hostilities against the Government." The unit later reached a peak strength of 350 in February 1923. Moynihan selected Peter Ennis as "Chief Superintendent". Ennis had been the commanding officer of the Irish Republican Police in Dublin during the 1919–1921 war, and was a brother of General Tom Ennis of the Free State's National Army. Ennis brought with him about fifteen of his old Republican Police to Oriel House and they formed the nucleus of the new "CID". Initially it was to have been a military structure, but the "privates" of 1922 ended up as "detective officers" by its disbandment in 1923. Broy, Nelligan and MacNamara, of the DMP "G" Branch were there in the beginning, but all got high ranks in the National Army Intelligence Department and went instead to Wellington Barracks where their HQ was located
During the conflict of 1922–1923, the CID was responsible for the arrest of over 500 Anti-Treaty IRA fighters as well as the seizure of much weaponry and documentation. It had files on over 2,500 republican suspects. It was also accused of using brutal interrogation techniques and of the assassination of republican suspects and prisoners. Among a large number of incidents in which the CID was implicated was the killing of five republicans in two separate incidents on 26 and 29 August 1922 and the dumping of the bodies in Drumcondra and Clondalkin suburbs. By 9 September, British Intelligence had reported that CID was believed to have, "killed a number of prominent republicans" in Dublin. There were many other such killings of Anti-Treaty activists by plain-clothed men in the Dublin area during the war, such as Bobby Bondfield in March 1923 and Noel Lemass in July of that year. Senior republican Thomas Derrig also had an eye shot out while in CID custody. It is possible, however that some of these killings were carried out by other agencies such as elements of the National Army, or by soldiers and CID men, but popularly attributed to "Oriel House". In his book "Salute to the men of '22", Brian O'Higgins documented at least twenty-five murders of Republicans in the Dublin area alone. In the conflict as whole, as many as 153 republican prisoners were summarily executed in the field. A study of the period concluded, "Oriel House succeeded in its task of suppressing small scale republican activities in the Dublin area, not by the sophistication and efficiency of its intelligence work... but by the more direct method of striking terror into its opponents." A total of four CID personnel were killed in the war. A number of attempts were also made to blow up Oriel House itself.
Disbandment
On 29 October 1923 the Oriel House CID was disbanded and 30 of its members were transferred to the Dublin Metropolitan Police as detectives. They later formed the basis of the Garda Special Branch. The CID as a whole was considered unsuitable for a police force in peacetime. In April 1925 the DMP was amalgamated with the Garda Síochána.