In 1852, he was elected a member of the Salem Common Council and, five years later, became City Solicitor. He was elected a member of the American Antiquarian Society in 1862. In 1853, he entered into a law partnership with J. W. Perry under the name Perry & Endicott, which was dissolved in 1873 upon his appointment to the bench. From 1857 to 1873, also served as president of the Salem Bank. In 1873, Endicott, although a Democrat, was appointed by Republican governor William B. Washburn to the Massachusetts Supreme Judicial Court, where he served until 1882. In 1879, he unsuccessfully ran for Congress, followed by an unsuccessful gubernatorial race in 1884. Grover Cleveland appointed Endicott Secretary of War and he served in that capacity in the administration between 1885 and 1889. Endicott oversaw many important changes in the organization of the United States Army, including the establishment of a system of examinations to determine the promotion of officers. Endicott convened and chaired the Board of Fortifications in 1885, which would provide detailed recommendations and designs for the generation of American coastal defense fortifications constructed in the era of the Spanish–American War. Most of these Endicott Period fortifications served through early World War II.
Personal life
On December 13, 1859, Endicott was married to Ellen Peabody in Salem. Ellen was the daughter of philanthropist George Peabody and Clarissa Peabody of Salem. Her grandfather was the distinguished Salem ship owner, Joseph Peabody, who made a fortune importing pepper from Sumatra and was one of the wealthiest men in the United States at the time of his death in 1900. Together, William and Ellen had two children:
William Crowninshield Endicott Jr., a lawyer who married Marie Louise Thoron, daughter of Joseph Thoron and Anna Barker Thoron, in 1889.
Mary Crowninshield Endicott, who married the British statesman, Joseph Chamberlain, in 1888. After his death, she married the Anglican clergyman, William Hartley Carnegie, in 1916.
Endicott died of acute pneumonia in Boston, Massachusetts on May 6, 1900. His wife lived another twenty-seven years, until her death in Boston on August 20, 1927, after which she was buried with William in the Endicott Lot at Harmony Grove Cemetery in Salem.