I-5 was laid down on 30 October 1929 at Kawasaki Dockyard Co. in Kobe, launched on 19 June 1931, and commissioned on 31 July 1932. The vessel entered service and was attached to Yokosuka Naval District, undergoing training and trials until 1933 when a catapult was fitted during refit. Similarly, between February and July 1936, the deck gun was temporarily replaced with a 12.7 cm (5 in) Type 89 dual-purpose gun. At the start of the Second Sino-Japanese War in 1937, the submarine was attached to the Third Fleet (China Theatre Fleet) based at Hong Kong alongside the submarine tender Komahashi and a fleet of cruiser submarines. The fleet was tasked with patrolling and blockading the central and southern Chinese coasts. Between 21 and 23 August, the submarine was in the East China Sea, providing distant cover for two battle fleets built around the battlecruisers Haruna and Kirishima, and the battleships Mutsu and Nagato that ferried troops from Japan to China.
In 1940, the submarine was withdrawn from service and refitted. The commissioning of more modern submarine aircraft carriers, the Type A and Type B, meant that the less advanced installation on I-5 was deemed superfluous. Therefore, during the refit, the provision to operate an aircraft was removed and an aft deck gun fitted in its place. At the same time, a single 25 mm (1 in) Type 96 anti-aircraft gun was fitted to an extended bridge. The submarine re-entered service as an attack submarine.
On 16 November 1941, the submarine departed as part of the 2nd Submarine Squadron led by Admiral Mitsumi Shimizu in I-7, alongside I-4 and I-6. The boat arrived off the coast of Hawaii to take up a position west of Oahu and was tasked with patrolling the area and attacking any US Navy ships that attempted to sortie in response to the Japanese action. On 7 December, the submarine moved to patrol north of Molokai, shortly before the attack on Pearl Harbor. The boat then remained on station during the attack.
After a brief interlude on 9 January 1942 joining other vessels of the Japanese Navy to hunt for the aircraft carrier USS Lexington, the submarine returned to the Japanese mainland. Following a refit in Yokosuka between 2 and 11 February, the submarine then departed to support the Dutch East Indies campaign, arriving at Staring-baai in Sulawesi on 23 February. On 25 February, while patrolling west of Timor, the submarine was observed by a Mitsubishi C5M reconnaissance aircraft which was being escorted by a flight of nine Mitsubishi A6M Zero fighters. Thinking that they had spotted an enemy vessel, the fighters attacked the submarine, inflicting minor damage and injuring three officers. After repairs, the submarine was sent to the Indian Ocean to disrupt shipping and support the Indian Ocean raid. On 5 April, the ship sank the United States merchant ship SS Washingtonian. On 5 June, I-5 was transferred to the Aleutian Islands campaign and joined the force, led by Admiral Boshirō Hosogaya, that landed the Japanese Northern Army on Attu Island.
However, an increasingly challenging logistical situation meant that on 16 November 1942, Admiral Isoroku Yamamoto ordered that submarines be made available as transports. Admiral Teruhisa Komatsu, who was commander of the 6th Fleet and thus responsible for submarine operations, responded by ordering the conversion of thirteen submarines as transports. The submarines operated a vital service, transferring supplies and people. I-5 was one of the submarines converted and reassigned, and a Daihatsu-class landing craft was fitted on 17 March 1943 to enable the faster transfer of personnel and resources in what were termed "ant carrying transport" operations. Nine days after, the submarine started the first of nine supply runs between Lae and Rabaul. Later, the submarine was relocated to supply the garrison in the Aleutian Islands. In between, the submarine also undertook other missions, such as rescuing pilots of Mitsubishi G4M bombers shot down by US forces on 14 and 15 May.
In June 1944, the Japanese became aware that their forces in the Mariana Islands would be subject to attack and formed a submarine picket, including I-5, 300 nautical miles (560 km) east of the Islands. The submarine was subsequently sent on a supply run to Pohnpei between 5 and 9 July, and then sailed to Truk from whence the boat departed on 16 July. On 19 July, the US Navy destroyer escort USS Wyman identified a sonar contact 360 nautical miles (670 km) east of Guam. Hedgehog bombs were fired and a destroyed submarine reported. The victim is believed to be I-5. There were no survivors. The submarine was removed from the Navy List on 10 September 1944.