The unit was initially a World War IIB-17 Flying Fortress and B-24 Liberator operational training unit (OTU). Redesignated as a replacement training unit (RTU) in October 1943. Inactivated in April 1944 when Second Air Force ended heavy bomber training.
The squadron was reactivated in 1952 as a Strategic Air CommandKC-97 Stratotanker squadron, providing air refueling to USAF units. The squadron was inactivated in 1963 as part of the phaseout of the KC-97 from SAC.
On 19 Sep 1985 the 40th Air Refueling Squadron was consolidated with the 540th Bombardment Squadron, (Heavy), a unit that was last active 1 Apr 1944. This action was directed by Department of the Air Force Letter DAF/MPM 662q Attachment 2 (Inactive Units), 19 Sep 1985. The Consolidated Unit will retain the Designation of 40th Air Refueling Squadron, Heavy".