Her postgraduate work took her throughout Europe where she further specialised in gynaecology and obstetrics, becoming a Licentiate of Midwifery in Ireland in 1901. Her first position was as a house surgeon at the Samaritan Hospital For Women in Glasgow in 1900, followed by Gynaecological Surgeon at the Victoria Infirmary in Glasgow from 1906–10. She continued her studies, gaining a DSc from the University of Glasgow in 1910. In 1911 she took up the position of First Assistant to Professor J. M. Munro Kerr, who held the Muirhead Chair of Obstetrics and Gynaecology at the University. At the outbreak of the First World War she and other women medical graduates offered their services to the government. They were declined as "the battlefield.. no place for women". They decided to set up the Scottish Women's Hospital for Foreign Service. She commanded the Girton and Newnham unit of the hospital at Domaine de Chanteloup, Sainte-Savine, near Troyes, France before being posted to Serbia and, three years later, Salonika. During her time in Salonika she established a nurses training school for Serbian girls and oversaw the establishment of the only orthopaedic centre in the Eastern Army. She finished her war service as a surgeon at a Royal Army Medical Corps hospital in Constantinople. In 1921, she was appointed to the Royal Free Hospital in London as consultant in obstetrics and gynaecology. She was the first woman Professor of Obstetrics and Gynaecology at the London School of Medicine for Women, becoming the first woman to be appointed a medical professor in United Kingdom. On 7 July 1921, McIlroy delivered a paper at the Medico-Legal Society in London. In it, she said that the "most harmful method of which I have experience is the use of the pessary". Dr Halliday Sutherland heard her talk and he later quoted her in his 1922 book "Birth Control". When Marie Stopes sued Dr Sutherland for libel over remarks in the book, McIlroy because a witness for the defence. She retired in 1934, in her own words 'to gain a few years of freedom' although she continued private practice at Harley Street and other hospitals and clinics throughout London. At the outbreak of the Second World War she came out of semi-retirement to work as a consultant for the maternity service at Buckinghamshire County Council. She was also the senior obstetrician to the Maternity Hospital for the Wives of Officers, Fulmer Chase. She was active in several professional medical associations: her interest in medical legal matters culminated in her becoming President of the Medico-Legal Society of London; at the British Medical Association she was vice-president of the Section of Obstetrics and Gynaecology in 1922, 1930 and 1932; a member of the Representative Body from 1936–39; a member of the BMA Council from 1938 to 1943, President of the BMA Metropolitan Counties Branch in 1946 and she was also president of the Section of Obstetrics and Gynaecology of the Royal Society of Medicine.
Publications
Throughout her career McIlroy wrote many articles in journals such as The Lancet, the British Medical Journal and The Practitioner, gave lectures and presented papers at conferences. Her particular interest was pre-eclampsia, pain relief during childbirth, managing asphyxia in newborn babies and social issues. She authored and co-authored several books including;
From a Balcony on the Bosphorus
Anaesthesia and analgesia in labour - with Katharine G. Lloyd-Williams
After the Second World War she returned to her retirement and left London to live with her sister, Dr Janie McIlroy, in Turnberry, Ayrshire, Scotland. She died in the Glasgow Hospital on 8 February 1968, aged 93. She never married.