Upon becoming secretary of Defense, Robert S. McNamara sought to fundamentally alter the way the military was structured and used. The escalating conflict in Vietnam provided him an opportunity to apply his theories of defense in a real-world situation -- with what some would argue were catastrophic results.
Any time the United States, as with many countries, goes to war, there is a certain amount of tension between the uniformed military officers planning and fighting the war and their civilian leaders, who may have different ideas about how things should be done. Such was certainly the case during the war in Vietnam.
"Rules of Engagement" (RoE) refers to the restrictions placed on the military's ability to fight by those at the top of command, in this case, the civilian elected officials. Those restrictions may be designed to limit civilian casualties, or to limit the scope of the war, in contrast to an all-out effort at destroying the enemy such as occurred during World War II. Most conflicts in which the United States becomes involved are of the restricted variety, and rules of engagement are always part of the operation, sometimes to the consternation of the uniformed military and sometimes with their agreement.
Secretary of Defense McNamara was known for his practice of "micromanaging" the military in Vietnam. Due in no small part to the limited knowledge on the part of the kind of warfare with which the United States was confronted -- in effect, guerrilla warfare as practiced by the Viet Cong and simultaneous conventional warfare as used by the North Vietnamese Army -- there was no consensus on how the war should be fought. This was not World War II, where the total defeat of Germany and Japan was U.S. policy. This was a war of unification launched by the communist North against the corrupt but pro-U.S. South, with the United States committed to the independence of the South, but not to the military defeat of the North. That is a crucial distinction. It was not U.S. policy to destroy the North, despite the large-scale bombing of northern targets; it was, rather, an effort at keeping South Vietnam independent from the North while trying to pressure the latter to negotiate a peace agreement.
In that context, the rules of engagement drafted by McNamara placed severe restrictions on U.S. fighter and bomber pilots with regard to the types of targets they could attack. Strict limits were placed on the types of buildings, for example, that were off-limits to U.S. military planners. Those limits, well-known to the North Vietnamese and to their allies and supporters in the Soviet Union, resulted in the use of hospitals, schools and other types of civilian buildings by North Vietnamese troops from which to fire on U.S. aircraft, the pilots of which were barred from striking back. Consequently, many American pilots blamed McNamara for the large number of U.S. warplanes shot down during the conflict, resulting in many American deaths and many pilots who survived ending up in prisoner-of-war camps.
There are a number of reasons for the U.S./South Vietnamese defeat in the war, but the U.S. policy of restricting targets in the north for long periods of time was one factor. That is why Robert McNamara's name is synonymous with micromanaging of the military to the detriment of operational effectiveness.