O-5, a submarine laid down 8 December 1916, was built in 1917 by Fore River Shipbuilding Co., Quincy, Mass.; launched 11 November 1917; and commissioned 8 June 1918, Lt. G. A. Trever in command.
During the final months of World War I, O-5 operated along the Atlantic coast and patrolled from Cape Cod to Key West. She departed Newport 3 November with a 20-sub contingent bound for European waters; however hostilities had ceased before the vessels reached the Azores.
After the Armistice, O-5 operated out of the Submarine School at New London, Conn. until 1923. O-5 then sailed to Coco Solo, C.Z. for a brief tour. On 28 October 1923, as O-5 entered Limon Bay, preparatory to transiting the Canal, she was rammed by United Fruit steamer Abangarez and sank in less than a minute, with the loss of 3 men.
Struck from the Navy Register 28 April 1924, she was sold as a hulk to R. K. Morris, Balboa, C.Z. 12 December 1924.