Michael Friedman attends a 2016 gala for the Public Theater in Manhattan. (Andy Kropa/Invision/AP)

Michael Friedman, an Obie Award-winning composer and lyricist known for the musicals “Bloody Bloody Andrew Jackson” and “Love’s Labour’s Lost,” died Sept. 9 in New York. He was 41.

The cause was complications from HIV/AIDS, said Oskar Eustis and Patrick Willingham, the artistic and executive directors of the Public Theater in Manhattan. Mr. Friedman was an artist in residence at the theater and the director of its audience engagement program.

His best-known work was the rock musical “Bloody Bloody Andrew Jackson,” which he created with writer Alex Timbers. The show imagines the seventh president of the United States as an emo rock star (in the mode of bands such as My Chemical Romance or Fall Out Boy) and skewers America’s personality-driven and at times reactionary politics.

Its theme song, “Populism Yea Yea,” features the chorus: “It’s the early 19th century / And we’re gonna take this country back / For people like us who don’t just think about things / People who make things happen.”

“Though its style is often as skewed as a tilt-a-whirl ride, ‘Bloody Bloody’ takes precision aim at its central target: an impatient electorate ruled by a hunger for instant gratification,” New York Times theater critic Ben Brantley wrote in October 2010 after the musical opened on Broadway in a 120-performance run.

“Mr. Friedman’s songs, cast in the hip but anguished mode of bands like Dashboard Confessional, could be described as post-ironic,” Brantley wrote. “They’re achingly sincere, even as they send up aching sincerity, hot and cool in one breath.”

Mr. Friedman was also a co-founder of the Civilians, an “investigative theater” troupe in New York, where he wrote music for shows including “This Beautiful City,” about evangelicals in Colorado, and “Pretty Filthy,” about the pornography industry.

His work ranged from the futuristic — “Mr. Burns, a Post-Electric Play,” written by Anne Washburn, imagined a group of apocalyptic survivors trying to remember the plot of an episode of “The Simpsons” — to the classically inspired.

“Love’s Labour’s Lost,” which premiered at New York’s Shakespeare in the Park festival in 2013, was Mr. Friedman’s second major collaboration with Timbers. The show, theater critic Hilton Als wrote on the New Yorker’s website, was “so good on so many levels that it makes you excited about not only what the American musical can do but how well it reflects on those producers who support the new, full-out.”

John Michael Friedman was born in Boston on Sept. 24, 1975, and grew up in Philadelphia. He studied history and literature at Harvard University and, after graduating in 1997, quickly made his way to New York.

Trained in piano, he began writing music relatively late, at 25. He said he did some of his best composing while listening to music on the subway.

A complete list of survivors was not immediately available.

Although Mr. Friedman counted Broadway classics such as “Carousel” among his favorites, he said that his works such as “Bloody Bloody” were influenced more by the subversive humor of television’s “The Muppet Show.”

The program, he said at one theater conference, “used conventions of musical theater while subverting them and making them a little ridiculous but also making them wonderful. That tension is what makes the best musicals good: trying to subvert this while also paying homage to it.”