Macdonell was born in India and educated at Göttingen University, then matriculated in 1876 at Corpus Christi College, Oxford, gaining a classical exhibition and three scholarships (for German, Sanskrit, and Chinese). He graduated with classical honours in 1880 and was appointed Taylorian Teacher of German at Oxford. In 1883 he obtained his Ph.D. from the University of Leipzig, and then became Deputy Professor of Sanskrit at Oxford in 1888, and Boden Professor of Sanskrit in 1899.
Macdonell edited various Sanskrit texts, wrote a grammar, compiled a dictionary, published a work on Vedic Mythology, and a wrote a history of Sanskrit.
Amongst Indological scholars in Oxford, where Macdonell spent his professional life, his name has, at least from the late 1960s, been pronounced with ictus accents on the first and final syllable: Mácdonéll.
Scots find this pronunciation laughably affected, and prefer: Məcdónell. The name is Scottish, after all, and a common one at that.