After earning his MBA, McNamara worked a year for the accounting firm Price Waterhouse in San Francisco. In August 1940 he returned to Harvard to teach in the Business School and became the highest paid and youngest Assistant Professor at the time. Following his involvement there in a program to teach the analytical approaches used in business to officers of the Army Air Forces (AAF), he entered the Army as a captain in early 1943, serving most of the war with the AAF's Office of Statistical Control. One major responsibility was the analysis of U.S. bombers' efficiency and effectiveness, especially the B-29 forces commanded by Major General Curtis LeMay in China and the Mariana Islands. He left active duty in 1946 with the rank of lieutenant colonel and with a Legion of Merit.
In 1946 McNamara joined Ford Motor Company, due to the influence of a Colonel he worked under named Charles "Tex" Thornton. Thornton had read an article in Life magazine which reported that the company was in dire need of reform. He was one of ten former WW II officers known as the "Whiz Kids", who helped the company to stop its losses and administrative chaos by implementing modern planning, organization, and management control systems. Starting as manager of planning and financial analysis, he advanced rapidly through a series of top-level management positions. McNamara opposed Ford's planned Edsel automobile and worked to stop the program even before the first car rolled off the assembly line. He eventually succeeded in ending the program in November 1959. He introduced the wildly popular Ford Falcon sedan as a much better alternative. During his role as an executive, McNamara placed a high emphasis on safety standards, introducing in the Lifeguard package both the seat belt, and a collapsible steering column. McNamara also came close to terminating the Lincoln, forcing product planners to reinvent the car for 1961. On November 9, 1960, McNamara became the first president of Ford from outside the family of Henry Ford. McNamara received substantial credit for Ford's expansion and success in the postwar period.
President-elect John F. Kennedy first offered the post of secretary of defense to former secretary Robert A. Lovett. Lovett declined but recommended McNamara; Kennedy had him approached by Sargent Shriver regarding either the Treasury or the Defense cabinet post less than five weeks after McNamara had become president at Ford. At first McNamara turned down the Treasury position; but eventually, after discussions with his family, McNamara accepted Kennedy's invitation to serve as Secretary of Defense.
Although not especially knowledgeable about defense matters, McNamara immersed himself in the subject, learned quickly, and soon began to apply an "active role" management philosophy, in his own words "providing aggressive leadership questioning, suggesting alternatives, proposing objectives and stimulating progress." He rejected radical organizational changes, such as those proposed by a group Kennedy had appointed, headed by Sen. W. Stuart Symington, which would have abolished the military departments, replaced the Joint Chiefs of Staff (JCS) with a single chief of staff, and established three functional unified commands. McNamara accepted the need for separate services but argued that "at the end we must have one defense policy, not three conflicting defense policies. And it is the job of the Secretary and his staff to make sure that this is the case."
Initially, the basic policies outlined by President Kennedy in a message to Congress on March 28, 1961 guided McNamara in the reorientation of the defense program. Kennedy rejected the concept of first-strike attack and emphasized the need for adequate strategic arms and defense to deter nuclear attack on the United States and its allies. U.S. arms, he maintained, must constantly be under civilian command and control, and the nation's defense posture had to be "designed to reduce the danger of irrational or unpremeditated general war." The primary mission of U.S. overseas forces, in cooperation with allies, was "to prevent the steady erosion of the Free World through limited wars." Kennedy and McNamara rejected massive retaliation for a posture of flexible response. The United States wanted choices in an emergency other than "inglorious retreat or unlimited retaliation," as the president put it. Out of a major review of the military challenges confronting the United States initiated by McNamara in 1961 came a decision to increase the nation's "limited warfare" capabilities. These moves were significant because McNamara was abandoning President Dwight D. Eisenhower's policy of massive retaliation in favor of a flexible response strategy that relied on increased U.S. capacity to conduct limited, non-nuclear warfare.
Increased attention to conventional strength complemented these special forces preparations. In this instance he called up reserves and also proceeded to expand the regular armed forces. Whereas active duty strength had declined from approximately 3,555,000 to 2,483,000 between 1953 (the end of the Korean conflict) and 1961, it increased to nearly 2,808,000 by 30 June 1962. Then the forces leveled off at around 2,700,000 until the Vietnam military buildup began in 1965, reaching a peak of nearly 3,550,000 by mid-1968, just after McNamara left office.
McNamara's institution of systems analysis as a basis for making key decisions on force requirements, weapon systems, and other matters occasioned much debate. Two of its main practitioners during the McNamara era, Alain C. Enthoven and K. Wayne Smith, described the concept as follows: "First, the word 'systems' indicates that every decision should be considered in as broad a context as necessary… The word 'analysis' emphasizes the need to reduce a complex problem to its component parts for better understanding. Systems analysis takes a complex problem and sorts out the tangle of significant factors so that each can be studied by the method most appropriate to it." Enthoven and Smith said they used mainly civilians as systems analysts because they could apply independent points of view to force planning. McNamara's tendency to take military advice into account less than had previous secretaries and to override military opinions contributed to his unpopularity with service leaders. It was also generally thought that Systems Analysis, rather than being objective, was tailored by the civilians to support decisions that McNamara had already made.
The most notable example of systems analysis was the Planning, Programming and Budgeting System (PPBS) instituted by United States Department of Defense Comptroller Charles J. Hitch. McNamara directed Hitch to analyze defense requirements systematically and produce a long-term, program-oriented Defense budget. PPBS evolved to become the heart of the McNamara management program. According to Enthoven and Smith, the basic ideas of PPBS were: "the attempt to put defense program issues into a broader context and to search for explicit measures of national need and adequacy"; "consideration of military needs and costs together"; "explicit consideration of alternatives at the top decision level"; "the active use of an analytical staff at the top policymaking levels"; "a plan combining both forces and costs which projected into the future the foreseeable implications of current decisions"; and "open and explicit analysis, that is, each analysis should be made available to all interested parties, so that they can examine the calculations, data, and assumptions and retrace the steps leading to the conclusions." In practice, the data produced by the analysis was so large and so complex that while it was available to all interested parties, none of them could challenge the conclusions.
Among the management tools developed to implement PPBS were the Five Year Defense Plan (FYDP), the Draft Presidential Memorandum (DPM), the Readiness, Information and Control Tables, and the Development Concept Paper (DCP). The annual FYDP was a series of tables projecting forces for eight years and costs and manpower for five years in mission-oriented, rather than individual service, programs. By 1968, the FYDP covered ten military areas: strategic forces, general purpose forces, intelligence and communications, airlift and sealift, guard and reserve forces, research and development, central supply and maintenance, training and medical services, administration and related activities, and support of other nations.
The DPM, intended for the White House and usually prepared by the systems analysis office, was a method to study and analyze major defense issues. Sixteen DPMs appeared between 1961 and 1968 on such topics as strategic offensive and defensive forces, NATO strategy and force structure, military assistance, and tactical air forces. OSD sent the DPMs to the services and the JCS for comment; in making decisions, McNamara included in the DPM a statement of alternative approaches, force levels, and other factors. The DPM in its final form became a decision document. The DPM was hated by the JCS and uniformed military in that it cut their ability to communicate directly to the White House. The DPMs were also disliked because the systems analysis process was so heavyweight that it was impossible for any service to effectively challenge its conclusions.
The Development Concept Paper examined performance, schedule, cost estimates, and technical risks to provide a basis for determining whether to begin or continue a research and development program. But in practice, what it proved to be was a cost burden that became a barrier to entry for companies attempting to deal with the military. It aided the trend toward a few large non-competitive defense contractors serving the military. Rather than serving any useful purpose, the overhead necessary to generate information that was often in practice ignored resulted in increased costs throughout the system.
The Readiness, Information, and Control Tables provided data on specific projects, more detailed than in the FYDP, such as the tables for the Southeast Asia Deployment Plan, which recorded by month and quarter the schedule for deployment, consumption rates, and future projections of U.S. forces in Southeast Asia.
He always believed that the best defense strategy for the US was a parity of mutually assured destruction with the Soviet Union. An ABM system would be an ineffective weapon as compared to an increase in deployed nuclear missile capacity.
Due to the nuclear arms race, the Vietnam War buildup and other projects, total obligational authority increased greatly during the McNamara years. Fiscal year TOA increased from $48.4 billion in 1962 to $49.5 billion in 1965 (before the major Vietnam increases) to $74.9 billion in 1968, McNamara's last year in office. Not until FY 1984 did DoD's total obligational authority surpass that of FY 1968 in constant dollars.
However, many analysts believe that even though the TFX project itself was a failure, McNamara was ahead of his time as the trend in fighter design has continued toward consolidation — the F-16 and F/A-18 were developed as multi-role fighters, and most modern designs combine many of the roles the TFX would have had. In many ways, the JSF is seen as a rebirth of the TFX project, in that it purports to satisfy the needs of three American Air arms (as well as several foreign customers), fulfilling the roles of strike fighter, carrier-launched fighter, VSTOL, and CAS (and drawing many criticisms similar to those leveled against the TFX).
The Vietnam conflict came to claim most of McNamara's time and energy. The Truman and Eisenhower administrations had committed the United States to support the French and native anti-Communist forces in Vietnam in resisting efforts by the Communists in the North to control the country, though neither administration established actual combat forces in the conflict. The U.S. role, initially limited to financial support, military advice and covert intelligence gathering, expanded after 1954 when the French withdrew. During the Kennedy administration, the U.S. military advisory group in South Vietnam steadily increased, with McNamara's concurrence, from just a few hundred to about 17,000. U.S. involvement escalated after the Gulf of Tonkin Incident in August 1964 when North Vietnamese naval vessels were reported as firing on two U.S. destroyers. McNamara was instrumental in selling this event to Congress and the public as a pretext for escalation.
President Johnson ordered retaliatory air strikes on North Vietnamese naval bases and Congress approved almost unanimously the Gulf of Tonkin Resolution, authorizing the president "to take all necessary measures to repel any armed attack against the forces of the U.S. and to prevent further aggression."
As the war expanded in Southeast Asia in 1964, the Johnson Administration was increasingly focused on the November presidential election, seeking to minimize America's growing and often covert involvement in Vietnam. Consequently, McNamara frequently failed to pass along the Joint Chiefs' comments or objections to administration policy, or misrepresented those views to the president. Following the retirement of Admiral George W. Anderson, Army General George Decker, and Air Force chief Curtis LeMay, the JCS became increasingly compliant to Johnson and McNamara's wishes. (H.R. McMaster, Dereliction of Duty, Harper Perennial, 1997.)
In 1965, in response to stepped up military activity by the nationalist Viet Cong in South Vietnam and their North Vietnamese allies, the United States began bombing North Vietnam, deployed large military forces, and entered into combat in South Vietnam. McNamara's plan, supported by requests from top U.S. military commanders in Vietnam led to the commitment of 485,000 troops by the end of 1967 and almost 535,000 by 30 June 1968. The casualty lists mounted as the number of troops and the intensity of fighting escalated. McNamara put in place a statistical strategy for victory in Vietnam. He concluded that there were a limited number of Viet Cong fighters in Vietnam and that a war of attrition would destroy them. He applied metrics (body counts) to determine how close to success his plan was.
Although he was a prime architect of the Vietnam War and repeatedly overruled the JCS on strategic matters, McNamara gradually became skeptical about whether the war could be won by deploying more troops to South Vietnam and intensifying the bombing of North Vietnam, a claim he would publish in a book years later. He also stated later that his support of the Vietnam war was given out of loyalty to administration policy. He traveled to Vietnam many times to study the situation firsthand and became increasingly reluctant to approve the large force increments requested by the military commanders.
During President John F. Kennedy's term, while McNamara was Secretary of Defense, America's troops in Vietnam increased from 500 to 16,000.
Some argue that McNamara knew about the potential deadly effects of Dow Chemical’s Agent Orange even as it was being used in Vietnam, and long before veterans came home to die or waste away from the herbicide's after effects. McNamara denies that he was aware of these dangers, and does not recall whether he was involved in the decision to use Agent Orange.
McNamara has said that the Domino Theory was the main reason for entering the Vietnam War. In the same interview he states, "Kennedy hadn't said before he died whether, faced with the loss of Vietnam, he would [completely] withdraw; but I believe today that had he faced that choice, he would have withdrawn." 
As McNamara grew more and more controversial after 1966 and his differences with the President and the Joint Chiefs of Staff over Vietnam strategy became the subject of public speculation, frequent rumors surfaced that he would leave office. In early November 1967, McNamara's recommendation to freeze troop levels, stop bombing North Vietnam and for the US to hand over ground fighting to South Vietnam was rejected outright by President Lyndon B. Johnson. McNamara's recommendations amounted to his saying that the strategy of the United States in Vietnam which had been pursued to date had failed. Largely as a result, on November 29 of that year, McNamara announced his pending resignation and that he would become President of the World Bank. Other factors were the increasing intensity of the anti-war movement in the United States, the approaching presidential campaign in which Johnson was expected to seek re-election, and McNamara's support--over the opposition by the Joint Chiefs of Staff--of construction along the 17th parallel separating South and North Vietnam of a line of fortifications running from the coast of Vietnam into Laos. The President's announcement of McNamara's move to the World Bank stressed his stated interest in the job and that he deserved a change after seven years as Secretary of Defense, much longer than any of his predecessors (and longer than any of his successors, to date).
Other sources give a different view of McNamara's departure from office. For example, Stanley Karnow in his book "Vietnam: A History" strongly suggests that McNamara was asked to leave by the President. McNamara himself has expressed lack of certainty about the question.
Shortly after McNamara departed the Pentagon, he published "The Essence of Security," discussing various aspects of his tenure and position on basic national security issues. He did not speak out again on defense issues or Vietnam until after he left the World Bank.
McNamara served as head of the World Bank from April 1968 to June 1981, when he turned 65. In his thirteen years at the Bank, he introduced key changes. He negotiated, with the conflicting countries represented on the Board, a spectacular growth in funds to channel credits for development, in the form of health, food, and education projects. He also instituted new methods of evaluating the effectiveness of funded projects. One notable project started during McNamara's tenure was the effort to prevent river blindness.
The World Bank currently has a scholarship program under his name.
McNamara has maintained his involvement in politics during recent years, delivering statements critical of the Bush administration's 2003 invasion of Iraq. On January 5, 2006, McNamara and most living former Secretaries of Defense and Secretaries of State met briefly at the White House with President Bush to discuss the War in Iraq.
Shapley concluded her book with these words: "For better and worse McNamara shaped much in today's world -- and imprisoned himself. A little-known nineteenth century writer, P.W. Bornum, offers a summation: `We make our decisions. And then our decisions turn around and make us.'"
The Fog of War: Eleven Lessons from the Life of Robert S. McNamara is a 2003 Errol Morris documentary consisting mostly of interviews with Robert McNamara and archival footage. It received an Academy Award for Documentary Feature. The particular structure of this personal account is accomplished with the characteristics of an intimate dialogue. As McNamara explains, it is a process of examining the experiences of his long and controversial period as the United States Secretary of Defense, as well as other periods of his personal and public life.
In the Errol Morris documentary, McNamara reports that both he and his wife were stricken with polio shortly after the end of WWII. Although McNamara had a relatively short stay in the hospital, his wife's case was more serious and it was concern over meeting her medical bills that led to his decision to not return to Harvard but to enter private industry as a consultant at Ford Motor Company.
When working at Ford Motor Company, McNamara resided in Ann Arbor, Michigan rather than the usual auto executive domains of Grosse Pointe, Birmingham, and Bloomfield Hills. He and his wife sought to remain connected with a university town after their hopes of returning to Harvard after the war were put on hold.
On September 29, 1972, a passenger on the ferry to Martha's Vineyard recognized McNamara on board and attempted to throw him into the ocean. McNamara declined to press charges. The man remained anonymous, but was interviewed years later by author Paul Hendrickson, who quoted the attacker as saying, "I just wanted to confront (McNamara) on Vietnam."
After his wife's death, McNamara dated Katharine Graham, with whom he had been friends since the early 1960s. According to Graham's autobiography, she and McNamara had planned to be traveling in California with two other friends (a married couple) on her 70th birthday, in 1987, so she could avoid any birthday celebration in Washington. Graham died in 2001.
As of July 2008, Robert McNamara is one of only three surviving members of the John F. Kennedy Administration. The others are former Secretary of Labor W. Willard Wirtz and former Secretary of the Interior Stewart Udall.
McNamara's book In Retrospect was seen by many as ironic for the quantitative approach the author took to explaining the mistakes of the Vietnam War.