S-21 (SS-126) was laid down on 19 December 1918 by the Bethlehem Shipbuilding Corp., Quincy, Mass. launched on 18 August 1920; sponsored by Mrs. Thomas Baxter; and commissioned on 24 August 1921, Lt. R. P. Luker in command.
Following operations from New London Conn., S-21 was decommissioned and returned to her builder on 31 March 1922. After she was reacquired by the Navy, S-21 recommissioned at Groton, Conn., on 14 September 1923, Lt. Comdr. Palmer H. Dunbar, Jr., in command. From 1923 into 1930, S-21 operated off the northeastern coast of the United States. From January into April 1924, she visited the Panama Canal, St. Thomas and Trinidad. Departing from New London on 25 November, she visited Hawaii, from 27 April to 25 May 1925, before returning to New London in July. Following duty in the Panama Canal area, from February through April 1926, she visited Kingston, Jamaica from 20 to 28 March 1927. After operating in the Panama Canal area, from February into April 1928 she later visited St. Thomas from 10 to 15 November.
S-21 served again in the Panama Canal area from March into April 1929, and from January through February 1930. Departing New London on 22 October that year, S-21 sailed via the Panama Canal and California to Pearl Harbor, arriving on 7 December. From 1931 into 1938, S-21 operated from Pearl Harbor, with the period 18 November 1932 to 24 January 1934 spent in reserve.
Departing Pearl Harbor on 15 October 1938, she sailed via California and the Panama Canal to Philadelphia, arriving on 11 December. Following overhaul she arrived at New London on 25 March 1939. She remained at New London with a partial crew from 1 June of that year until 1 September 1940, when she was returned to full duty.
On 9 December, two days after the Pearl Harbor attack, S-21 got underway for the Panama Canal Zone. Arriving ten days later, she conducted defensive patrols in the Pacific approaches to the canal through May 1942. Her second such patrol, 24 January to 7 February, was canceled to allow her to participate in search and rescue operations for S-26 which had been rammed by PC-460 on the first day of the patrol.
In June 1942, S-21 returned to New London. On 14 September, she was decommissioned and was transferred to the United Kingdom. As HMS P. 551, she served in the Royal Navy until returned to the United States Navy, at Philadelphia, on 11 July 1944. Subsequently used as a target, she was sunk off northern New England on 23 March 1945.