Nicholas deB. Katzenbach, an unflappable lawyer who served as the Kennedy brothers’ emissary to the South during the violent confrontations over racial segregation in the early 1960s and who later was an architect of landmark civil rights laws and Vietnam War policy under President Lyndon Johnson, died May 8 at his home in Skillman, N.J. He was 90.

He had been in failing health since breaking a hip in December, said his wife, Lydia Stokes Katzenbach.

A hulk of a man with a penchant for rumpled suits, Mr. Katzenbach was a law professor at the University of Chicago and Yale before joining the Kennedy administration in 1961. He built a reputation during his years in government as a sure-footed problem-solver who was called on to deal with many of the public crises that defined the 1960s.

He wrote a key midnight brief during the Cuban missile crisis, challenged FBI Director J. Edgar Hoover over the wiretapping of civil rights leader Martin Luther King Jr., conceived of the Warren Commission to investigate President John F. Kennedy’s assassination, and argued with some of the most powerful federal officials over how to extricate the country from the Vietnam War.

He is perhaps most widely remembered for his role as a graceful negotiator during political and physical altercations over court-ordered desegregation in the South.

In the early 1960s, Kennedy and his brother, Attorney General Robert Kennedy, feared that sending military troops to force integration of public institutions would spark an anti-Democrat revolution in the South. So they twice turned to Mr. Katzenbach, then deputy attorney general, to lead federal marshals in securing safe passage for black students attempting to register at previously all-white schools.

“Hey, Nick. Don’t worry if you get shot,” Robert Kennedy quipped as Mr. Katzenbach left Washington to oversee the enrollment of a black student, James Meredith, at the University of Mississippi in 1962. “The president needs a moral issue.”

When Meredith arrived at Ole Miss, the campus erupted in a race riot that lasted 15 hours and ended only after Mr. Katzenbach, who sent urgent communiques to Washington via collect calls from a campus pay phone, persuaded the Kennedys to send in 25,000 U.S. soldiers.

Onlookers wielding rocks, lead pipes and rifles laid siege to Mr. Katzenbach and his 400 federal marshals, who took refuge in the basement of a university administrative building. Mr. Katzenbach became the de facto field general, directing the marshals to refrain from resorting to gunfire even as the violence left dozens injured and two dead, a French journalist and a curious bystander.

Meredith, who survived the riots in his guarded dormitory room, ultimately enrolled.

Mr. Katzenbach stepped outside into the detritus of the chaos — broken glass, bricks and baseball bats — and gave an interview to a Canadian television reporter.

“He stood in the sunlight and gently, graciously and without imputation of evil designs to anybody, he described what was happening on TV in French,” fellow Justice Department employee James Symington later recalled. “He had the sang-froid to do this.”

Mr. Katzenbach later said he thought he had failed the Kennedys utterly because of the violence.

In June 1963, Mr. Katzenbach navigated a similarly explosive situation when segregationist Gov. George Wallace planted himself in the doorway of the University of Alabama to block two black students from registering. Rather than escorting the students to a dangerous and politically messy showdown — the Kennedys did not want to antagonize the South by arresting a sitting governor for defying court-ordered integration — Mr. Katzenbach approached Wallace alone in the searing Tuscaloosa heat.

Mr. Katzenbach bent over the considerably shorter Alabama governor, who launched into a diatribe against the “central government” within view of the assembled TV cameras. Wallace, who had presidential ambitions, got the national media attention he was seeking.

But Mr. Katzenbach achieved his aim, too. The students were sent to their dormitories — Mr. Katzenbach had procured their room keys by telling university officials that Justice officials needed to do a security sweep — and registered without incident later that day.

Mr. Katzenbach’s performance in Alabama earned him admiration from the Kennedys and a public reputation as a “courageous egghead, committed activist and intellectual who put principle ahead of expediency, public good before personal safety,” wrote journalist Victor S. Navasky in a 1971 New York Times profile.

That night in a nationally televised address, President Kennedy called for a comprehensive civil rights bill. Mr. Katzenbach largely wrote that bill, and his soft-pedal salesmanship was crucial in passing it over a Senate filibuster in 1964.

Mr. Katzenbach was successful at least in part because “he was not an idealogue who alienated people,” civil rights historian Taylor Branch said. “Like any good lawyer, he could see people coming from the other side and figure out some kind of accommodation to move the whole thing forward.”

After Robert Kennedy resigned as attorney general in fall 1964, Mr. Katzenbach was named to the post and served for two years under Johnson.

Mr. Katzenbach continued to address civil rights issues, particularly at the bloody march from Selma to Montgomery, Ala. He was also the president’s key partner in writing and passing the 1965 Voting Rights Act, which established direct and extensive federal oversight of elections to ensure fair voter registration practices.

As the Vietnam War began to dominate policy discussions and protests, Mr. Katzenbach volunteered for a demotion, leaving his Cabinet position to become undersecretary of state in 1966. At the time, he said he could no longer serve as attorney general because of his deteriorating relationship with Hoover, with whom he had clashed over the wiretapping of King’s phones and hotel rooms.

In his 2008 memoir, “Some of It Was Fun,” Mr. Katzenbach offered a different reason for his resignation: The work at Justice had begun to feel less urgent than ending the war in Vietnam. “It seemed to me from afar and ignorance that there ought to be a way to put the killing to an end,” he wrote. “If so, I would like to try.”

Behind the scenes, particularly after visiting Saigon, Vietnam, himself, he tried to push the war toward a negotiated peace as a member of Johnson’s informal war cabinet. But publicly, he was seen as an apologist for the bloody stalemate after he told a Senate subcommittee that although Congress hadn’t formally declared war, it had legally authorized Johnson’s escalation of the conflict when it passed the Tonkin Gulf Resolution in 1964.

That resolution, issued in response to an alleged attack on U.S. naval ships by North Vietnamese forces, came at Johnson’s urging to express “the unity and determination of the United States in supporting freedom and in protecting peace in Southeast Asia.” Doves in Congress were livid that Johnson, via Mr. Katzenbach, used it to justify war.

Mr. Katzenbach left government at the end of Johnson’s administration in early 1969. “I felt that I’d been something of a failure in the State,” he later recalled. “I went over there to try to get us out of Vietnam, which was probably a very arrogant thing to think I could do.”

Nicholas deBelleville Katzenbach was born Jan. 17, 1922, in Philadelphia. He grew up in Trenton, N.J., where his mother was a member of the state board of education for 44 years and its president for nine. His father, who died when Mr. Katzenbach was 12, was a lawyer and state attorney general.

Mr. Katzenbach graduated from the private Phillips Exeter Academy and enrolled at Princeton University in 1939. After the 1941 attack on Pearl Harbor, he left school to join the U.S. Army Air Forces as a navigator.

In 1943, he was shot down during a Mediterranean bombing mission. He spent the next two years as a prisoner of war in Italy and Germany, escaping twice, only to be recaptured both times. While incarcerated, he spent 18 hours a day reading books provided by the YMCA and the International Red Cross.

“I really said to myself,” Mr. Katzenbach later recalled, “if I get out of this, I’m going to try to do something in this world, not make a fool out of myself.”

After the war, he returned to Princeton and was allowed to graduate almost immediately based on the strength of his examinations and senior thesis.

In 1946, he married Lydia Stokes. Besides his wife, of Skillman, survivors include four children, Christopher Katzenbach of Mill Valley, Calif., John Katzenbach of Amherst, Mass., Maria Katzenbach of Portland, Ore., and Anne Katzenbach of New York City; and six grandchildren.

Mr. Katzenbach received a law degree in 1947 from Yale, where he served as editor of the law review, and then won a Rhodes Scholarship to Balliol College at Oxford.

He was recruited to the Kennedy administration by Byron White, a top Justice Department official and old law school friend who later was named to the U.S. Supreme Court. After his government career, Mr. Katzenbach became general counsel for IBM, leading the company’s legal team during one of the longest antitrust cases in U.S. history. The suit, which sought to break the computer giant into several companies, ground along for 13 years until the Reagan Justice Department dropped it in 1982, saying it was “without merit.”

He retired from IBM and went on to investigate the October 1987 stock market collapse for the New York Stock Exchange. In 1990, he took over as chairman of Washington’s First American Bankshares, when the bank was mired in turmoil and corruption.

Later, after the country entered the Iraq war, he expressed his desire for a return to consensus and compromise in Washington.

“Being members of political parties does not relieve our legislators of their responsibilities to all constituents, not merely those who supported or helped to finance their candidacies,” he said in 2003, speaking at Ole Miss four decades after the violence there. “Ideologues of any stripe make poor protectors of fundamental freedoms.”