SAN FRANCISCO — At the end of the 2012 documentary How to Survive a Plague, we see a group of ACT UP protestors march on the nation’s capital with the ashes of their dead, a counterprotest to the exhibition of the AIDS Memorial Quilt on the Washington Mall. A member of the march tells us that while the AIDS Quilt is important, it makes beautiful the ugly reality faced by the millions still dying. Pouring the ashes on the White House lawn, these militant activists pose a still necessary question: how can one be an ethical witness to a pandemic? Or, to borrow from Douglas Crimp’s essential 1989 essay “Mourning and Militancy”: what is the appropriate way to mourn and recognize one’s “terror, rage, guilt, and sadness” about the scourge of HIV/AIDS?

As a scholar of visual culture and social movements, questions like these frame so much of my research and teaching. Yet in my classes on art and the AIDS crisis, one artist has rarely (if ever) been featured: Keith Haring. After visiting Keith Haring: The Political Line, now in its final week at San Francisco’s de Young Museum, I realize just how wrong I have been about Haring all of these years.

I didn’t avoid teaching Haring because I didn’t know about him; rather, I think I had a kind of Haring fatigue borne of oversaturation. I was born in New York in 1982, the year that Keith Haring had his first solo show at Tony Shafrazi’s gallery. His work was all over New York in the 1980s and early ’90s; the murals, subway sketches, and mass-produced items (Swatch watches, T-shirts, magnets) were so much a part of the city that it was easy to overlook them as a naturalized piece of the very unnatural urban landscape. Over the years, I forgot what his work stood for, if I ever really understood it then. His doodles as I remember them looked happy, full of life, and just too cheery. As works of protest art, they felt wrong, not nearly angry enough compared to ACT UP’s public die-ins in front of the White House and the FDA.

But to see Haring’s work anew at the de Young reminded me of two things: First, that embracing beauty and joy can be a radical act of queer protest, a claiming of one’s worthiness of surviving at a time when the world was telling you that you deserved to die. Second, that his output was far more troubling than the more ubiquitous images would suggest, especially when framed in their appropriate social justice context, as curators Julian Cox and Dieter Buchhart have done here.

Taking up the de Young’s lower floor galleries, the works overwhelm with their volume and scale. And overwhelm they should, for the social crises on which Haring passionately commented in the ’80s remain urgent matters today: the homophobia and hypocrisy of the Catholic Church, racism, the AIDS crisis, the threat of nuclear warfare and environmental destruction, police brutality and surveillance culture, and the increasing technologization of everyday life.

Unlike the squiggly figures and smiling dolphins I remember from Haring’s public art, many of the pieces in The Political Line are apocalyptic, dark, and just plain twisted. “The Last Rainforest” (1989), one of Haring’s final paintings, made before he died at 31 from AIDS-related complications, is Hieronymus Bosch’s “The Last Judgment” remixed for the television age. A cacophony of unrelenting, nightmarish images assaults the eye, with the excesses of our modern culture sketched upon a neo-expressionist background of harsh red and yellow. A peaceful Buddha baby sits lotus-style at the center, reserving judgment for our lost world and perhaps offering more consolation than Bosch’s angry Jesus. The 14-foot-tall “The Great White Way” (1988) is a pink, penis-shaped hieroglyph of the ways that whiteness is consolidated as institutional power: through money, religion, and sexual violence. Even more innocuous and decorative pieces like Haring’s obsessively drawn sculptural collaborations with Angel Ortiz (aka LA II) invoke death by taking on the forms of faux-Egyptian sarcophagi and Grecian funereal urns. It was in encountering, finally and in person, the large pink triangle of “Silence=Death” (1988) that I understood: regardless of his commercial success, Keith Haring mattered then and he matters now because of his gift as a critical witness.

In even his most joyful work — the angels, dogs, and figures holding hearts, the icons so easily depoliticized and reproduced on posters and, now, iPad covers — Haring seduces you into looking towards the marginal and the ugly, and especially towards the devastation that AIDS wrought on queer communities. How radical an act of witnessing this was at a time when Ronald Reagan, Ed Koch, and the FDA wanted nothing more than for you to look away from the dead and dying and to distance yourself from the so-called “gay cancer.” How important Haring’s work remains today, when younger people only remember Magic Johnson and the success of antiretroviral drugs, not the ongoing, unnecessary loss of so many millions more. Keith Haring lived without compromise and produced art without censure. I dare you to try to look away.

Keith Haring: The Political Line continues at the de Young Museum (50 Hagiwara Tea Garden Drive, Golden Gate Park, San Francisco) through February 16.