In the military Østgaard was promoted to captain in 1921, major in 1935 and lieutenant colonel in 1940. During the Norwegian campaign which followed the German invasion of Norway in April 1940, Østgaard served with the royal family in their flight northwards and then to the United Kingdom. He also followed the Crown Prince on his travels to North America. He was promoted to head aide-de-camp for the Crown Prince in 1945, from 1 January 1958 for the King of Norway as Olav was crowned as such. Østgaard held the rank of colonel from 1946. He also issued a book on Crown Princess Märtha of Norway in 1955 and edited a book on King Olav in 1957. Nikolai's son Einar (1929–2012) wrote two accounts on the royal family's flight in 1940; "Reisen hun ikke ønsket" (2005) and "Kongen i krig" (2009).