Heglund had tried to enlist with the Norwegian army flight school in the autumn of 1939 but the admission deadline had already expired. When he completed his period of national service conscription he travelled to
Zurich to study engineering. He was in Switzerland when
Norway was invaded by Germany in April 1940. Heglund managed to reach the United States via
Bordeaux and
Portsmouth. In New York he joined fellow Norwegians (
Bernt Balchen,
Hjalmar Riiser-Larsen and some other Norwegian officers) in the Army Air Force. In July 1940 he went to
Little Norway near
Toronto, Canada.
No. 331 Squadron RAF Heglund travelled from Canada to Britain and joined No. 59 Operational Training Unit (59 OTU) where he trained on
Miles Master and then the
Hawker Hurricane fighter. After completing training he joined newly formed
No. 331 (Norwegian) Squadron RAF on
Orkney. The squadron was based at
RAF Skeabrae flying Hurricane Mk.IIBs. The squadron's duties were to fly cover over the Royal Navy base at
Scapa Flow and escort convoys. In November 1941 the squadron received
Spitfire Mk. IIAs, which in March 1942 was replaced with Spitfire Mk. Vb. A few weeks later the squadron moved south to an
RAF North Weald in Essex. The squadron was now involved in escorting bombers to targets on the continent and defending London from air attack. After completing over 200 hours of operational flying Heglund was sent to a Spitfire Operational Training Unit in February 1943. After three months, he returned to 331 Squadron as a newly appointed captain and commander of the squadron's A-flight. Whilst with 331 Squadron Heglund shot down 12 fighters confirmed with 5 probables. In November 1943 Heglund transferred to
RAF Ferry Command, transporting aircraft from manufacturer to airfields.
No. 85 Squadron RAF In 1944 contacted
John Cunningham, former commander of
No. 85 Squadron RAF. With this squadron he trained on the
Mosquito and became a night fighter. ==Post war==