Murphy was commissioned as a captain of the 11th New York Infantry (Fire Zouaves) 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.