He married Anna Marie Allen of Philadelphia, Pennsylvania. They had a total of five children together: William H., Jr.; Mary A., Victoria A., Lenore, and Leroy Emmanuel Stanton. Stanton commenced practice in Scranton, an industrial city in the anthracite region of northeastern Pennsylvania. He was editor of the Scranton Daily Times until 1872. He served as District Attorney and Prosecuting Attorney of the Scranton Mayor's Court from 1872 to 1874. He served in the Pennsylvania State Senate for the 20th district in 1875 and 1876. Stanton was elected as a Democrat to the 44th United States Congress, filling the vacancy caused by the resignation of Republican Winthrop W. Ketcham, appointed as a federal judge. He served from December 4, 1876 to March 3, 1877. He did not stand as a candidate in 1876 for election to a full two-year term. In August 1877, Scranton erupted into a general strike, as mine workers and others joined railroad workers. Thousands of workers protested wage cuts. After three men were killed by a mayor-appointed group known as the Citizens' Corps, Patrick Mahon, alderman of the Sixth Ward, acted as county coroner to investigate the deaths, assisted by Stanton. Based on his coroner's jury, Mahon issued warrants for more than a dozen arrests. Stanton was later elected in late 1877 in a "wave of labor reform politics" as the candidate of the Greenback-Labor Party for Judge of the Luzerne County Court of Common Pleas, defeating incumbent Judge Dana, who was supported by Republicans and Democrats. In April 1878 the legislature passed an act authorizing the creation of new counties if population reached 150,000 in an existing county. This applied only to Luzerne County, and Lackawanna County was approved for organization in August 1878 as the last county in the state. The New York Times at the time described "excitement" in the lobbying around the formation of the new county, with a revisiting of issues related to the general strike in Scranton the previous year. As the new county had more than 40,000 inhabitants, it qualified to be designated as a new judicial district. After maneuvering by the governor, Stanton and other judges were ordered by the state supreme court to assist in the organization of county courts in the new Lackawanna County in October 1878. Stanton was reassigned as one of the judges for Lackawanna's County Court of Common Pleas, to be held at the county seat of Scranton. Stanton resigned his judgeship in February 1879. The New York Times reported later that fellow Democrats in the Assembly had begun impeachment proceedings against Stanton in retaliation for his snubbing Daniel Dougherty and other important Philadelphia counsel in an unfavorable ruling, and he resigned rather than being forced out. William Walker Scranton, general manager of Lackawanna Iron and Coal, contended that articles published in August 1878 in the Scranton Times and Labor Advocate, during the lobbying for the new county, were libelous and encouraged violence against him. He filed a libel suit against Aaron Augustus Chase, editor of the Scranton Daily Times and a colleague of Stanton. Implicated by witnesses in the scandal (and thought by some to have written the article in Labor Advocate, Stanton was arrested and prosecuted for libel. Stanton was tried in September 1879 and acquitted. A separate libel trial of Chase resulted in his conviction and being sentenced to a fine and jail time. At the conclusion of the libel trial, the New York Times reported Scranton as saying that Stanton had offered to resign his judgeship if W.W. Scranton dropped his prosecution against him.
Later life
After leaving the bench, Stanton became an organizer of the reform Greenback and Labor movements, which had a peak of influence in this area in the late 1870s and early 1880s, extending into the Southern Tier of New York. He left Scranton in 1883, living first in Arkansas, and in 1884 moving to Kansas City, Missouri. He made national headlines when travelling back to Scranton to run for judge, his wife back in Kansas took all his money and deserted the children. The family was reunited and Stanton returned to Scranton, where he practiced law until his death in 1900.
Death and burial
Stanton died in Scranton on March 28, 1900. He was buried in Scranton's West Side Catholic Cemetery. He was survived by his widow and five children: two sons and three daughters.