At a time of heightened national security, the country's premier spy agency has shone a light on its origins.

ASIO's first official history has been published, revealing new details of its early struggles against those considered to be enemies of the nation.

Authored by Professor David Horner, The Spy Catchers details ASIO's first 14 years and documents its Cold War struggles against Soviet spies and the Communist Party of Australia.

It reveals the organisation's head in the 1950s, Brigadier Charles Spry, fed political advice to then prime minister Robert Menzies during the 1951 referendum on whether to ban the Communist Party.

"ASIO becomes captive of this chasing Communists and looking for Communists in every possible area and ultimately a great waste of resources in that respect," Professor Horner told the ABC.

The organisation was so focused on fighting Communism it recruited potential Nazi war criminals, he said.

"The people that ASIO was hoping to recruit against the Communists, there could have been evidence that they were perhaps war criminals, and ASIO did not pursue that because they were blinded in their focus on dealing with the Communists," Professor Horner said.

A source's value in undermining Communism was more important to ASIO at the time than their personal history, he said.

"[ASIO] would say if a person had been a war criminal that was actually not against the security of Australia," Professor Horner said.

"They would say 'that’s not a matter of national security in Australia, whereas the Communists are'."

But Professor Horner believes history has been unkind to the organisation's long serving director-general Spry, who he credits for "building ASIO into a professional organisation".

The 700-page official history also reveals a letter to Menzies in which Spry warns the prime minister against moves to shift the organisation's headquarters from Melbourne to a new building in Canberra.

It reveals the spy master was concerned that it would be hard for ASIO staff to retain anonymity in such a small city and that a new building would be "notorious before its erection could be completed".

Professor Horner enjoyed unprecedented access to ASIO's records to write the official account and insists there was no censorship applied to the project.