Sergeant Hammett worked as a Pinkerton detective from 1915 to 1922, taking 1918 to enlist in the U.S. Army Ambulance Corp. During his enlistment, Sergeant Hammett contracted the Spanish Flu and then Tuberculosis, which would plague him for the rest of his life.
Unable to maintain his career as a detective, Sergeant Hammett began publishing detective novels, including The Maltese Falcon.
In addition to his writing, he was also a left-wing activist, and, during 1930, joined the Communist party.
Despite his political affiliations and tuberculosis, he managed to re-enlist in the U.S. Army in 1942, after the attack on Pearl Harbor. Sergeant Hammett was assigned as editor of the Army newspaper The Adakian. He also co-authored, with Corporal Robert Colodny, The Battle of the Aleutians, under the supervision of Major Henry Hall. It was during this time, Sergeant Hammett developed emphysema.
After his service, Sergeant Hammett returned to his political activism, becoming the president of the Civil Rights Congress (CRC), a group considered a Communist organization and on the Attorney General's list of subversive organizations. This association caused him legal struggles, a contempt of court charge, jail time, and blacklisting.
Sergeant Hammett died at Lenox Hill Hospital on January 10, 1961, from lung cancer. He is buried in Arlington Cemetry.