He served in the army from 1915 to 1919. During the period 29 September/3 October 1918 near Cambrai, France, Captain MacGregor acted with most conspicuous bravery and leadership. He led his company under intense fire, and although wounded, located and put out of action enemy machine-guns which were checking progress, killing four and taking eight prisoners.
He then reorganised his command under heavy fire and in the face of stubborn resistance continued the advance.
Later, after a personal daylight reconnaissance under heavy fire, he established his company in Neuville Saint Remy, thereby greatly assisting the advance into Tilloy. He is buried at Cranberry Lake Cemetery, Powell River, British Columbia.
His biography was published under the title MacGregor Victoria Cross