The Atlantic magazine on Thursday terminated its relationship with Kevin D. Williamson, the conservative writer whose hiring last month angered liberals and sparked an online debate about what views are considered acceptable in mainstream publications.

It was Mr. Williamson’s hard-line stance on abortion — namely, that it should be treated as premeditated homicide and punished accordingly, perhaps by hanging — that generated the initial controversy over his hiring.

It was that same viewpoint that led to his abrupt departure.

Mr. Williamson expressed it during a Twitter exchange in September 2014. After hiring him in late March, Jeffrey Goldberg, the magazine’s editor in chief, defended Mr. Williamson, saying that he did not want to judge people for their “worst tweets, or assertions, in isolation.”

But on Thursday, Mr. Goldberg wrote in a memo to his staff that he had come to see the writer’s remarks on Twitter as something more than merely trollish. The editor cited a podcast episode from the same month in which Mr. Williamson elaborated on his anti-abortion views — which seemed in keeping with how he had described them on Twitter.