O-7 was launched on 16 December 1917, at the Fore River Shipbuilding Company, and commissioned on 4 July 1918, with Lieutenant Commander F.C. Sherman as her first commanding officer. She patrolled the east coast of the United States during the final months of World War I, departing for Europe as part of a twenty-boat group on 2 November 1918. The entire group was called back before reaching Europe when the war ended on 11 November.
She was assigned to the Submarine School in New London from 1919, remaining there during the 1920s. In 1924, along with a number of other O-boats, she was sent to Coco Solo, in the Panama Canal Zone, for exercises. She was mothballed at Philadelphia 1 July 1931.
Reactivated during the buildup for World War II, O-7 was recommissioned on 12 February 1941. Returning to New London, she served as a training boat until after the German surrender. Decommissioned on 2 July 1945, she was stricken on 11 July, and sold for scrap on 22 January 1946.
Builder: Fore River
Sponsor: Mrs. Constance Sears
First Captain: LCDR F.C. Sherman