When the Civil War broke out, the Hartford was ordered to return home. Greene, having been promoted to lieutenant on August 31, 1861, arrived in Philadelphia on December 2, 1861. After a short leave, he volunteered for duty on the Monitor. Greene was appointed executive officer, serving under Commander Lieutenant John L. Worden during its historic four-hour battle at Hampton Roads, Virginia, with the Confederate ironclad warship on March 9, 1862. During the battle he assumed full command of Monitor when Worden was temporarily blinded by shell fragments from an explosion from one of Virginias broadsides. After the subsequent retreat and assessment of all damage Greene ordered the return to battle and continued engaging the Virginia to a standoff. Greene continued to command the Monitor until Thomas O. Selfridge, Jr. took command on March 10, 1862. From April to May 1862 Greene continued to serve as executive officer on Monitor during the Battle of Drewry's Bluff on the James River, Virginia, and later provided naval support for General McClellan's forces on land along that river. Greene was aboard the ship when it foundered in a gale 20 miles off Cape Hatteras on December 31 – January 1, 1863, which Greene survived after being pulled into a lifeboat by the ship's surgeon, Dr. Grenville M. Weeks. In 1863 Greene served aboard the gunboat on the blockade of North Carolina, then in 1864–1865 aboard the sloop, under the command of Christopher R. P. Rodgers, sailing around South America and across the Pacific to Singapore in search of the Confederate raider.
Post-war career
Greene was promoted to Lieutenant Commander on August 11, 1865, and served as instructor of mathematics at the Naval Academy from 1866 to 1868. From 1868 to 1871 he served in the Pacific Squadron, aboard the sloops and, and the screw steamer. He served as the head of the department of astronomy, navigation and surveying at the Naval Academy from 1871 to 1875, receiving promotion to Commander on December 12, 1872. Greene commanded the and between 1875 and 1878, was assistant superintendent of the Academy from 1878 to 1882, then commanded the in 1883-1884. Greene was serving as the executive officer of the Portsmouth Navy Yard when on December 11, 1884 at the age of 45, he committed suicide at Portsmouth, New Hampshire, and was buried in Bristol, Rhode Island.