Upon commissioning, I-42 was attached formally to the Yokosuka Naval District.[1] In late November 1943 she took part with the submarines I-43, I-184, Ro-40, and Ro-113 and the submarine tenderChōgei in antisubmarine warfare exercises in the Iyo-nada in the Seto Inland Sea.[1][2] By 1 January 1944, she was part of Submarine Division 11 in Submarine Squadron 7 along with I-43, I-184, Ro-40, Ro-113, and the submarines I-52, I-183, Ro-41, Ro-43, Ro-114, and Ro-115.[1] On 31 January 1944, she was reassigned to Submarine Division 15 in the 6th Fleet.[1]
On 12 February 1944, I-42 departed Yokosuka on her first war patrol, assigned a patrol area northeast of Truk.[1] She reached her patrol area on 20 February 1944.[1] She called at Saipan in the Mariana Islands from 3 to 4 March 1944, then proceeded to Truk, where she arrived on 7 March 1944.[1] She got back underway on 15 March 1944 to make a supply run to Palau, which she reached on 19 March 1944.[1] After embarking cargo and passengers, she departed Palau on 23 March 1944 on a supply run to Rabaul on New Britain, with an estimated date of arrival of 30 March 1944.[1]
I-42 was zigzagging on the surface at 18 knots (33 km/h; 21 mph) on the first evening of her voyage when the United States Navy submarine USS Tunny, which had been alerted to I-42′s schedule by Ultra intelligence information, detected I-42 on radar at a range of 13,000 yards (11,900 m) at 21:19 on 23 March 1944.[1] Also on the surface, Tunny closed to within visual range and identified I-42 as a Japanese I-boat.[1]I-42 also sighted Tunny, and for almost 90 minutes each submarine maneuvered on the surface to obtain a firing position against the other while trying to deny one to her opponent.[1] Finally, at 23:24, when the two submarines were 6 nautical miles (11 km; 6.9 mi) southwest of Angaur, Tunny fired four torpedoes at I-42 at a range of 1,900 yards (1,700 m), then immediately turned hard to starboard to avoid a collision and crash-dived to prevent I-42 from making a torpedo attack of her own.[1] Just before Tunny′s hatch closed, her crew saw a bright flash and felt and heard two explosions.[1] Diving to 150 feet (46 m), Tunny circled the area, and her sound operator heard I-42′s propeller noises stop.[1]Tunny′s crew heard the noises of I-42 breaking up for the next hour.[1]I-42 sank with the loss of all 102 men aboard at 06°40′N134°03′E / 6.667°N 134.050°E / 6.667; 134.050 (I-42).[1]
On 27 April 1944, the Imperial Japanese Navy declared I-42 to be presumed lost with all hands north of the Admiralty Islands.[1] She was stricken from the Navy list on 30 April 1944.[1]