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 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 where he trained on Miles Master and then the Hawker Hurricane fighter. After completing training he joined newly formed No. 331 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
In 1945 Heglund returned to Zurich to complete his studies. Back in Norway he held several positions in connection with the Air Force Material Command. In 1970 he became Chief of Air Defence of the Armed ForcesHigh Command, and in 1974 Head of LFK (a position he held until he retired in 1982, with the rank of major general.
Awards
The first Norwegian decoration Heglund received was War Cross which was awarded "for having rendered the Norwegian Defence major services through active participation in air operations against the enemy through a long time." During the war he shot down 16 German planes; 7 Focke-Wulf Fw 190, 6 Messerschmitt Bf 109 and as a night fighter he shot down 3 Messerschmitt Bf 110. On 20 July 1945 Heglund was awarded the War Cross for the second time. He was awarded the Distinguished Flying Cross twice and Distinguished Service Order.