J.D. McClatchy, a tireless champion of verse who taught, edited, criticized and wrote poetry for more than four decades, producing elegant and occasionally carnal poems as well as more than a dozen opera libretti, died April 10 at his home in Manhattan. He was 72.

He had cancer, said his husband, graphic designer Chip Kidd.

Mr. McClatchy, who went by “Sandy,” published several essay collections and eight volumes of poetry, most notably “Hazmat,” a finalist for the Pulitzer Prize in poetry in 2003. Taking its title from the shorthand term for “hazardous material,” the book featured poems with stark themes and one-word, two-syllable names — “Cancer,” “Feces” and, controversially, “Jihad.”

The latter, a set of three linked sonnets about a “skinny martyr” who boards a bus with bombs strapped to his chest, was scheduled to run in the New York Times shortly after the Sept. 11, 2001, terrorist attacks, Mr. McClatchy told the Paris Review in 2002, but was pulled from publication over concerns that “it might offend the Palestinians.”

“Politically, I’m in favor of the Palestinian cause. But poems aren’t platforms,” he continued, explaining his approach to poetry. “A poet — as distinct from other, perhaps more persuasive, kinds of writers — can only unstitch the weave of tangled threads. Poems are meant to complicate our sense of things, not pamper them.”

Mr. McClatchy crafted thematically complex, technically dexterous poems on self-deceit, gay identity, Japanese history, latrinalia, romantic yearning and his literary forebears, including the Americans Elizabeth Bishop and James Merrill and the ancient poets Ovid and Horace. At its best, whether in blank verse or in a 39-line sestina, his work was lyrical and bracing.

“There are very few poets writing today who, poem by poem, move me from admiration to admiration, and always with renewed and novel delight,” Pulitzer Prize-winning poet Anthony Hecht once said, according to the Academy of American Poets. “There is no poet writing whose intelligence, dexterity, wit or depth of thoughtfulness or feeling is greater or more telling than J.D. McClatchy’s.”

Notable deaths in 2018 and 2019: Nipsey Hussle, George H.W. Bush, Stan Lee, John McCain, Aretha Franklin and other famous faces we’ve lost

Nipsey Hussle, a Grammy nominated rapper who sought to revive South Los Angeles, died at age 33 on March 31. Read the obituary (Matt Winkelmeyer/Getty Images for Warner Music)

Mr. McClatchy was nearly as well known for the poetry he helped shepherd into print. A former chancellor of the Academy of American Poets and president of the American Academy of Arts and Letters, he served as a mentor to younger writers and anthologized their work in collections such as the wide-ranging “Vintage Book of Contemporary World Poetry” (1997).

As an editor, he oversaw collections by Edna St. Vincent Millay, Henry Wadsworth Longfellow and Emily Dickinson, provided commentary for Random House’s “Voice of the Poet” audio series, and brought out new releases by the late poets Hecht and Mona Van Duyn, for whom he served as literary executor.

With Stephen Yenser, he was also literary executor for Merrill, who died in 1995. Mr. McClatchy had befriended the elder poet in the 1970s, when he helped him light a cigarette at a book reading; years later, he helped Merrill conceal his AIDS diagnosis — “He didn’t want to have himself be the object of anyone’s pity or praise because he was ill,” Mr. McClatchy explained — and co-edited an acclaimed 2001 edition of Merrill’s “Collected Poems.”

In an email, Poetry magazine editor Don Share described Mr. McClatchy as “a literary polymath, firmly but sensitively guiding the work of many talents into print as an editor while remaining ingeniously productive as a poet, librettist, teacher, scholar and mentor.”

In all things, Share continued, Mr. McClatchy was “a shaper and a maker. American literature would not be what it is without him.”

Joseph Donald McClatchy Jr. was born in Bryn Mawr, Pa., on Aug. 12, 1945. His father worked in advertising in Philadelphia, and his mother was a homemaker.

The family was more musical than literary: A grandmother often took him out of school to see Friday performances by the Philadelphia Orchestra, and he developed a deep love of opera — what he called “the ideal representation of the inner life” — after seeing a performance of Verdi’s “La Traviata” at 14.

Mr. McClatchy received a bachelor’s degree from Georgetown University in 1967. He said he learned to read, seriously and deeply, while studying under literary critic Harold Bloom at Yale, where he received a doctorate in English in 1974.

He taught at schools including Princeton University and Columbia University before returning to Yale, where he chaired the creative writing program. He edited its venerable literary quarterly, the Yale Review, from 1991 until his retirement in 2017, while publishing poetry collections that began with his 1981 debut, “Scenes From Another Life.”

Mr. McClatchy turned to opera in 1987, when Pulitzer-winning composer William Schuman asked if he could craft a libretto for what became “A Question of Taste,” which was based on a Roald Dahl story and premiered in 1989. “It was as if I’d changed a lightbulb and suddenly was being called an electrician,” Mr. McClatchy told the New York Times in 2006. “People started passing me around.”

He later wrote the libretto to “Emmeline,” from a novel by Judith Rossner, for composer Tobias Picker, and translated libretti by Mozart and Bizet.

Survivors include his partner of 22 years, whom he married in 2013; and three sisters.

His last published poem, Kidd said, was a semiautobiographical piece about a recent purchase in Stonington, Conn., where Mr. McClatchy — like Merrill — kept a home for many years. Titled “My Plot,” the poem opened with a mordant touch:

It seemed as good a time as any to buy

A cemetery plot. The price is bound

To spike, the local real estate being

What it is

For both the living and the dead, and seeing

How few opportunities to make a sound

Decision are left as our debilities multiply,

I signed up for a double bed...