When World War II broke out, Shaw took a break from acting and joined the Royal Air Force. He was commissioned as an Acting-Pilot Officer on probation in the Administrative and Special Duties Branch on 25 April 1941 and over the next three months was promoted to Pilot Officer on probation, then Flying Officer and then Flight Lieutenant. According to his obituary in the "Guardian", he saw little action in the service and was told the only chance he would have to fly would be as a rear gunner. Some of his fellow airmen hounded Shaw for autographs while others mocked his posh accent, to which he retaliated with an excellent and unflattering imitation of their less refined speech. He continued to hold a Royal Air Force Volunteer Reserve commission after the war until he resigned the commission on 10 February 1954; he was permitted to retain his rank.