Magie was appointed to serve as the Prosecutor of Union County, New Jersey on April 3, 1866, and served for five years. That same year formed the law firm Magie & Frost in nearby Somerville, New Jersey.
He was Republican member of New Jersey Senate from Union County from 1876 to 1878.
Magie was associate justice of New Jersey Supreme Court from 1880 to 1897, and chief justice from 1897 to 1900. From 1900 to 1908 he was Chancellor of New Jersey Chancery Court, which before the Constitution of New Jersey was re-written in 1947, was the highest court in the state's court system.
As Chancellor, in his role as Special Master, Magie presided over the trail in 1908, the purpose of which was to determine if the chloride of lime system that had been installed by Jersey City Water Supply Company was effective in controlling harmful bacterial levels and capable of providing water that was "pure and wholesome". Over 38 days, dozens of witnesses were heard and hundreds of exhibits were submitted. More than three thousand pages recorded the testimony of expert witnesses for both sides including William T. Sedgwick, George C. Whipple, Earle B. Phelps, Charles-Edward A. Winslow and a number of other experts for the plaintiffs and John L. Leal, George W. Fuller and Rudolph Hering (among others) for the defendants. Justice Magie issued his ruling on May 9, 1910, which was a victory for the defendants. Chlorine was an acceptable treatment for the removal of pathogens from drinking water and for making the water "pure and wholesome" for human consumption.
"I do therefore find and report that this device is capable of rendering the water delivered to Jersey City, pure and wholesome, for the purposes for which it is intended, and is effective in removing from the water those dangerous germs which were deemed by the decree to possibly exist therein at certain times."
After the trial there was the wide introduction of chlorine for disinfection. Statistics on the typhoid fever death rate in the U.S. showed a dramatic decrease in deaths due to the disease Filtration of water supplies contributed to the decrease in the typhoid fever death rate but chlorination is generally acknowledged as having a major impact on increased life expectancy in the U.S.