WALDHEIM: THE MISSING YEARS; By Robertt Edwin Herzstein; Arbor House; 303 pages; $18.95.

A young man - of narrow intelligence but immense ambition and pleasing manner - is reared within a conservative, provincial family in a small, painfully divided and embattled country. A foreign dictatorship takes power. He adjusts accordingly, gaining an elite education as war nears. He is conscripted, wounded and eventually assigned to brutal antiguerrilla operations as a junior officer; responsibilities and decorations come his way.Peace breaks out. He returns to a homeland defeated, occupied and transformed politically. Opportunities beckon for bright young men with clean - more or less - records. No one inquires too deeply. He becomes a diplomat, works hard and rises rapidly, gains a reputation at the United Nations, and becomes its secretary-general in 1971.

This is, of course, Kurt Waldheim, as he is portrayed in this authoritative account, half biography, half detective story, and all rooted solidly in documents, not journalistic speculations or politicized assumptions. Robert Herzstein is a professional historian whose experience with German military documents of World War II led the World Jewish Congress to commission him in 1986 to investigate Waldheim's past.

There had long been rumors in Austria regarding the vague remarks for 1942 to '45 in Waldheim's record. Behind all the sachertorte and Strauss waltzes, however, stand centuries of hierarchy and deference to the elite. This deference ended for Waldheim in 1985, when, having been passed over for the Nobel Peace Prize, he became the conservative candidate for president. The Socialists began digging, press reports appeared, and the World Jewish Congress in New York joined the fray, fearing that a Waldheim victory would legitimize by example some even more dubious folk.

Here was a reaffirmation of political Lesson 1: A low profile is essential for those with embarrassing records. Perhaps Waldheim felt his eminence precluded investigation. More likely, he simply lacked the imagination to foresee the reaction, not so much to his actions in the wartime Balkans, but to his subsequent camouflage of the record.

And so to Lesson 2: Archives, public records, and research libraries can yield devastating evidence to skilled investigators, not least in this case because staff officers leave a far longer paper trail than do line commanders. Using German Army unit histories and documents, Herzstein goes far in tracking Waldheim through operations in Greece and especially against Tito's partisans.

Clearly, Waldheim was not the SS man some headlines have irresponsibly charged, nor a war criminal, nor even a Nazi Party member. But he did belong to Nazi Party affiliates in Austria and was an efficient cog in the military machine, whose often-bloody activities he participated in as an intelligence officer: Witness the atrocities in 1942 at Kozara in central Yugoslavia.

What of Waldheim himself, whom Herzstein interviewed at length? The former secretary-general was as polite as ever but unyielding and, somehow, bewildered by it all: I was only following orders! It was war; what could I do? And didn't everyone fib a little afterward? Waldheim embodies the cozy myth of Austria as Hitler's first victim, deserving pity, not judgment. That this lie has been exposed, that Austrians now have to confront their own violent and anti-Semitic past: This is why the Waldheim story matters, and why so many Austrians hate it so.