No. 7 Squadron was established during World War I, being raised as a flying training squadron of the Australian Flying Corps (AFC) at Yatesbury, England, on 24 October 1917. Equipped with a wide range of aircraft, the squadron commenced training operations in February 1918 and was tasked to provide replacement aircrew to No. 3 Squadron until being disbanded in early 1919. Upon formation it was designated as No. 32 (Australian) (Training) Squadron, Royal Flying Corps, before adopting its AFC designation in early 1918. Its first commanding officer was Captain H.D.E. Ralfe.
During World War II, No. 7 Squadron was re-formed at RAAF Station Laverton, Victoria, on 27 June 1940.