Greene joined the United States Marine Corps. He was commissioned a second lieutenant on March 3, 1847. In 1857, Greene, who advocated that Marines become artillerists, was sent to West Point to receive training as an artillerist. Afterward he returned to Washington to instruct Marines at the Washington Navy Yard. In April 1859, Greene became the commander of the Marine Barracks, Washington, D.C. and served as commander for two months. In November 1860, he led a detachment of Marines who accompanied the first Japanese diplomats to visit the United States on board the USS Niagara on their return trip to Japan.
John Brown's Raid
On October 17, 1859, abolitionist John Brown and a group of 21 men captured the United States Army arsenal at Harpers Ferry, Virginia. On orders from President James Buchanan, Secretary of War John B. Floyd asked for the assistance of the Navy Department for a unit of United States Marines, the nearest troops. First Lieutenant Greene was ordered to take a force of 86 Marines to the town. At 3:30 in the afternoon, Greene and the Marines proceeded to Harpers Ferry by Baltimore & Ohio Railroad, they even brought two 12-pounder Dahlgren guns. At 10:00 that evening, they were met by Lieutenant Colonel Robert E. Lee, who was the commander of the expedition. The night they surrounded the engine house where Brown and his followers as well as nine hostages were barricaded. At 6:30 on the morning of October 18, Lee had Lieutenant J.E.B. Stuart approach the engine house in an attempt to get Brown to surrender. When that failed, he waived his cap which was the signal for Greene and a detail of 12 Marines to storm the engine house. Two Marines armed with sledgehammers tried in vain to break through the door but were soon forced to retreat. Greene found a wooden ladder in the yard that belonged to the engine house and ordered the other ten Marines to use it as a battering ram to knock the front doors in. Greene was the first through the door and with the assistance of Lewis Washington identified and singled out John Brown. Greene later recounted what happened next: The action inside the engine house happened very quickly. In three minutes, the Marines had killed four of John Brown's men as well as freed all of the hostages. Brown, who was wounded, and his few surviving followers who were still alive were taken prisoner. One Marine was killed in the action and another one was wounded: Private Luke Quinn was killed during the storming of the engine house when he was shot in the abdomen, and Private Matthew Ruppert who was shot in the face inside the engine house, but fully recovered. The next day, Greene and a detail of Marines escorted Brown to nearby Charles Town, and turned him over to the civil authorities. Brown was later tried and executed there.
Confederate Marine Corps
After Virginia declared that it had seceded from the Union, Greene resigned his commission in the U.S. Marine Corps on May 17, 1861. He was one of 16 Marine officers to resign. On July 30, declining an appointment as either a lieutenant colonel in the Virginian infantry or as a colonel in the Wisconsin militia, he joined the newly formed Confederate States Marine Corps where he was given the rank of captain. He would later be promoted to major and was Adjutant and Inspector of the Corps. He served throughout the war at Confederate Marine headquarters in Richmond until his capture and parole at Farmville, Virginia, in April 1865.
After the Civil War, he lived in Clarke County, Virginia, until about 1873. He then moved west and settled in Mitchell, Dakota Territory and was a pioneer civil engineer and surveyor. On May 25, 1909, Greene died at the age of 85 on his farm near Mitchell. He is buried in Graceland Cemetery in Mitchell.