She had a distinguished war record as Medecin Chef at the Scottish Women’s Hospital, in France and later in Salonika and Serbia. She was awarded the Croix de Guerre and two Serbian medals.

After the First World War, she became a consultant and Professor of Obstetrics and Gynaecology at the Royal Free Hospital in London and published extensively, notably a pioneering textbook The Toxaemias of Pregnancy.

Created Dame of the British Empire in 1929 for services to midwifery, and became a founder fellow of the Royal College of Obstetricians and Gynaecologists. She was appointed to the General Council of the British Medical Association and was a Fellow of the Royal College of Physicians. Among other achievements, McIlroy was one of the first to insist on an anaesthetic in every maternity case, to do work on the resuscitation of the newborn, and, above all, to teach her students to avoid "meddlesome midwifery."