Prime Vietnam Directive [...]

The Prime Directive of Star Trek (or at least the embrace of it) may have evolved out of U.S. ambivalence about Vietnam. It was part of Rodenberry's vision of "progressive humanity".

The Prime Directive of "Star Trek: TOS" is primarily a way to process America's 1960s misadventure in Vietnam. Would that more generals and chickenhawks dreamed dreams that taught them of the limits of foresight and calculation, the surprising nature of war, and the unlikelihood of success if you start by breaking things. I first recognized that "Star Trek" was a very different kind of show back in the 1960s, when at the end of "Arena" Kirk neither kills nor civilizes the Gorn, but lets him go to make his own destiny. Gene Roddenberry mostly wanted to find a way to get people to pay him to make up stories, so that we wouldn't have to take a job that required a lot of heavy lifting. But he also wanted to tell particular stories. The stories he wanted to tell were those that would be the dreamwork for a better future. He wanted to tell stories of a progressive humanity. He wanted to tell stories about people in a better future in which governmental institutions were smart enough to stay out of Vietnam and people weren't obsessed with leaky roofs and food shortages. He wanted to tell stories in which racial prejudice was as silly and stupid as it, in fact, is. He wanted to tell stories in which it would be normal for a woman to be if not #1 at least #2 as first officer of a starship. He wanted to tell stories in which everyone--even the Red Shirts--was an officer, a trained and well-educated professional treated with dignity and respect by their peers and superiors. (Source)

Sci-fi For/Against Vietnam [...]

A breakdown of science fiction writers for and against the Vietnam War from June 1968 Galaxy Magazine:

Commentary on the differences:

Looking backward at the rival camps, we may be puzzled by Pohl's inability to distinguish between either their ideologies or their conflicting roles in modern SF. For the pro-war list reads like a roll call of champions of super-science and supermen, of manly and military virtue, while the anti-war list includes almost the entire vanguard of "New Wave'' SF, profoundly hostile to technocracy, militarism, and imperialism. Yet Pohl's yearning for the vanished if not mythical community of SF also represented a wider national nostalgia. For the apparently unified, content, smiling-faced nation of the late 1950s, product of the post-war repression that had stifled almost all dissent, seemed in the process of being torn asunder by America's war in Vietnam.

Indeed, when Kate Wilhelm and Judith Merril began soliciting signatures for the anti-war statement, they had assumed that "95 percent'' of the writers would sign because of the "global and anti-racist view'' that supposedly guided SF. Surprisingly, Merril was shocked to discover that Robert Heinlein was among those who responded with vociferous declarations of "America first'' and the "US must win.''

Prime Vietnam Directive describes how the Prime Directive of Star Trek may have evolved out of American ambivalence about Vietnam.