The family emigrated to the United States in 1848. He attended the common schools in Manhattan, New York City and then became a compositor. Murphy was commissioned as a captain of the 11th New York Infantry in May 1861, and served with the regiment until transferring to the 170th New York Infantry in July 1862. He was promoted to lieutenant colonel of the 170th New York Infantry in February 1863. For actions while commanding his regiment during the Battle of North Anna, he was later awarded the Medal of Honor. The following month, he was dismissed due to disability. In 1866, he was a general of the Fenian Army which prepared to take part in the Fenian raids on Canada. Murphy was a member of the New York State Assembly in 1867, 1868, 1869 and 1870. In 1870, he was charged with bigamy and was absent from the Legislature for most of the session. He was again a member of the State Assembly in 1881, 1882 and 1883. He was a member of the New York State Senate from 1884 to 1889, sitting in the 107th, 108th, 109th, 110th, 111th and 112th New York State Legislatures. On March 3, 1898, Murphy was appointed by Mayor Robert A. van Wyck as Commissioner of Health of the City of New York, a post which he held for nearly three years, until van Wyck appointed him the first New York City Police Commissioner on February 22, 1901. He remained in office until January 1, 1902, when he tendered his resignation to incoming Mayor Seth Low. Murphy was already in poor health, and could not eat any solid food. Instead, he was fed especially prepared liquid meals through a silver tube inserted into his stomach. Thus he was absent most of the time from his office, and appointed Ex-Chief of Police William Stephen Devery as First Deputy Police Commissioner to take care of the department during his absence. He died on March 4, 1903, and was buried at Kensico Cemetery in Valhalla, New York. Surviving him was his widow, Mary, with whom he had had no contact for more than 30 years.
Medal of Honor citation
Rank and organization: Lieutenant Colonel, 170th New York Infantry. Place and date: At North Anna River, Va., 24 May 1864. Entered service at: New York, N.Y. Birth: Ireland Date of issue: 15 January 1897.
This officer, commanding the regiment, kept it on the field exposed to the fire of the enemy for 3 hours without being able to fire one shot in return because of the ammunition being exhausted.