Macphail was born in Orwell, Prince Edward Island, on the family's newly purchased 100-acre farm. His father was William Macphail, a schoolmaster; his mother was Catherine Moore Smith formerly of Newton, P.E.I.
Macphail was educated at Prince of Wales College in Charlottetown, and then at McGill University in Montreal, where he received his medical degree in 1891. "During his studies at McGill Macphail wrote reviews and articles for various newspapers, including the Montreal Gazette and the Chicago Times, and saved enough money to finance a trip around the world." He resumed his studies in England, where he became "a member of the Royal College of Surgeons and a licentiate of the Royal College of Physicians. He returned to Canada in 1892."
He married Georgina Burland of Montreal in 1893. They had two children, Jeffrey and Dorothy.
From 1893 until 1905 Macphail practised medicine and taught at the University of Bishop's College. At Bishop's, he was professor of the diseases of children. Beginning in 1895 he also served as a consulting pathologist at the city's Western and Verdun hospitals.
In 1903 he became editor of the Montreal Medical Journal; "when it merged with another medical periodical eight years later to establish the Canadian Medical Association Journal, Macphail was made editor of the new monthly." He was editor of the Journal until the outbreak of World War I.
He was appointed McGill's first Professor of the History of Medicine in 1907, and held that position until 1937.
Macphail enlisted in World War I at the age of 50, and served at the front with a field ambulance corps for 20 months. Assigned to the Sixth Field Ambulance, he "served with distinction at a number of battles including Vimy Ridge."
Macphail wrote The Medical Services, Volume One of the Official History of the Canadian Forces in the Great War. His volume "appeared in 1925 and, as a result of its critical view of both the minister of militia and the surgeon general, caused a major controversy in political and military circles."
He wrote an essay on Canadian poet John McCrae, "An essay in character," for the 1919 edition of McCrae's In Flanders Fields And Other Poems.
Macphail was also a novelist. The vine of Sibmah: a relation of the Puritans (1906) is a romantic novel set in the Restoration period. In 1921 he published the first translation of Louis Hémon's classic Maria Chapdelaine.
Macphail published four one-act plays — The land (1914), The last rising (1930), Company (1936), and The new house (1937) — "none of which were performed." The Land was "a loose adaptation of The Taming of the Shrew, which MacPhail uses to critique market speculation ... class inequality, and what he saw as the disintegration of the family. His solution is a return to 'the land' and to a rural agrarian society."
His 1929 book, Three persons, "is made up of extended reviews of memoirs by three figures of the First World War, including T. E. Lawrence." The reviews were "a sensation on both sides of the Atlantic. Indeed, the London Mercury labelled the book 'the most devastating review published in the last hundred years.'"
Macphail was "throughout his career essentially an essayist, a literary role to which his strong personality was ideally suited." "Essays in puritanism (1905) is a series of biographical studies of literary and religious figures; Essays in politics (1909) is about contemporary political issues, particularly ... the imperial connection between Canada and Great Britain; Essays in fallacy (1910) offers lengthy polemical critiques of feminism, modern education, and modern theological trends."
Many of Macphail's essays were taken from the University Magazine, a literary journal which he founded in 1907 and (except for the four years of World War I) edited until its closing in 1920. It has been called "an outstanding Canadian quarterly." The Governor General, Earl Grey, called it "the best periodical published in Canada." Sponsored by Dalhousie, McGill and Toronto universities, its contributors included Rudyard Kipling, several cabinet ministers, and many Canadian academics and literary figures such as Stephen Leacock and Marjorie Pickthall.
Macphail's book The Master's Wife was published posthumously, in 1939. It is the book to which Macphail "devoted most care, and which he considered his best." Part biography of himself and his family ("The Master" was his father), part history of their community, Orwell, the book has been called "an excellent description of 19th century life on P.E.I., a very important social history of P.E.I.'s past."
A facsimile of the 1939 edition is sold by the University of Prince Edward Island's Institute of Island Studies, with all profits going to the Sir Andrew Macphail Foundation.
Macphail was "knighted for his literary and military work" in January 1918.
He was awarded an honorary doctorate from McGill. He received the Quebec government prize for literature in 1928.
Macphail was elected a Fellow of the Royal Society of Canada in 1910. In 1930, the Society awarded him its Lorne Pierce Medal.
The Sir Andrew Macphail Foundation preserves his birthplace and its 140-acre property in Orwell as a museum, the Sir Andrew Macphail Homestead. It is the site of the Macphail Woods Ecological Forestry Project, a joint effort of the Foundation and the Environmental Coalition of Prince Edward Island to preserve the old-growth Acadian Forest covering much of the property.