23 Squadron was re-formed at Richmond in New South Wales on 6 February 1939, where it performed naval cooperation duties and parachute and photographic officer training. The unit relocated to Archerfield in August 1939 (the first squadron to move to Queensland) where it was re-equipped with Wirraway and, later, Hudson aircraft.

At the beginning of 1942 a detachment of Wirraways was sent to Port Moresby and later absorbed into a new squadron. Meanwhile, the rest of 23 Squadron moved to Amberley and re-equipped with Bell Airocobras. These aircraft were reallotted to other units in February 1943 and 23 Squadron was re-quipped with Vultee Vengeance bombers. The unit did not return to active service in the Pacific theatre until February 1944, when it moved to Nadzab in New Guinea and commenced operations over targets around Saidor, Madang, and Alexishafen.

Like other squadron's using the ill-suited Vultee Vengeance aircraft, 23 Squadron was withdrawn to Australia and rearmed with Liberator bombers. In April 1945, after a year of training of conversion, 23 Squadron moved to Long airfield in the Northern Territory and commenced attacks on the Netherlands East Indies. The unit then moved to Morotai to support the Allied assault landing at Labuan on 10 June 1945 and also made attacks on Balikpapan in support of amphibious landings.

At the cessation of hostilities the squadron evacuated servicemen. It then moved to Tocumwal in New South Wales in November 1945 and to Amberley in April 1946 to be re-equipped with Liberator aircraft.