In a recent interview with The New York Times, Mr. Frazier elaborated for the first time on his motivation for taking a stance.

“It was my view that to not take a stand on this would be viewed as a tacit endorsement of what had happened and what was said,” he said. “I think words have consequences, and I think actions have consequences. I just felt that as a matter of my own personal conscience, I could not remain.”

Mr. Frazier spoke to The Times for the Corner Office column, a series of interviews with business leaders that was a regular feature from 2009 until last fall. It will return next month with a fuller interview with Mr. Frazier, in which he covers a broad range of topics, including his upbringing, his early career, and Merck’s efforts to fight cancer and other diseases.

The events that led to Mr. Frazier’s confrontation with the president unfolded over a tense summer weekend, as white nationalists gathered in Charlottesville to protest the removal of a statue of Robert E. Lee. Bloody fighting broke out as they clashed with counterdemonstrators, one of whom was killed when a self-described neo-Nazi drove his car into a crowd of people.

“I saw what was happening on that Friday night, and then I heard the horrible news about what had happened on Saturday with the young woman being killed, and others being run down by a person who was sympathetic to people who held views that I consider personally noxious,” Mr. Frazier said. “And then I heard the president’s response.”