Mary Arthur was born in Greenwich, New York to William and Malvina S. Arthur. She was the last of nine children. She attended the Emma Willard Seminary in Troy, New York and later married insurance salesman John McElroy. The couple had four children.
In 1880, Mary's brother Chester was elected vice-president. In July, 1881, President James Garfield was fatally wounded and died on September 19, 1881. Chester Arthur succeeded him, and asked Mary to care for his young daughter Ellen and act as his hostess while he was in the White House. Because she had her own family in Albany, New York, Mary lived in Washington, D.C. only during the busy winter social season. During the six months of mourning for James Garfield, Arthur had the White House renovated. When he moved back after the renovations, Mary brought Ellen Hansbrough Herndon and two of her own children to the White House. It is said they were the best behaved children to ever live in the White House. Although President Arthur never officially granted her the protocol of a formal position, she proved to be a popular and competent hostess.
Mary Arthur McElroy presided over a number of events and honored former First Ladies Julia Tyler and Harriet Lane, James Buchanan's niece and social hostess, by asking them to help her receive guests at the White House.
When Arthur refused his party's nomination in 1884, Mary retired to Albany, New York. She was a member of the Albany Association Opposed to Women's Suffrage.
She died at the age of 75 in Albany, New York.