As you may have noticed over the years, being a supporting cast member of a superhero is typically a very dangerous thing to be, since supervillains who fail at killing the superhero often compensate by attacking their friends and family, as well. It seems as though the third most common cause of death in the Marvel Universe is dating Wolverine.
However, in the case of Batman's trusted butler, Alfred Pennyworth, the first time that he died in the comics was not actually an instance of a supervillain trying to gain revenge on Batman by attacking someone close to him. Alfred had a more noble death, sacrificing himself to save his two caped friends, Batman and Robin, from some bad guys. That was what happened in the comic book, but the real reason for Alfred's first death was built into events that occurred outside of Batman comics, in the work of Fredric Wertham and then the ensuing establishment of the Comics Code Authority.
For many years, a common meme has been to make fun of how seemingly suggestive old Batman comic books were regarding Batman and Robin being gay. These were almost assuredly all written and drawn without any intent of the kind at the time, but in retrospect, they really do come off as hilariously suggestive...
However, people joking about Batman and Robin being gay (which was pervasive long before the Comics Code Authority came into existence) was not as important as when Fredric Wertham began to discuss the impact of Batman and Robin on the sexuality of youth in his influential (and controversial) 1954 book, Seduction of the Innocent.
Wertham dedicated less than four pages in the book to the discussion of Batman and Robin's impact on youth sexuality and what he wrote has been generally misunderstood over the years...
Wertham specifically did not note that Batman and Robin were actually gay, but rather, he made the bizarre argument that Batman and Robin were psychologically gay, which is to say that there were so many homoerotic elements that it would make a young child question their own sexuality. Obviously that's ludicrous, but in his excellent book, The Caped Crusade: Batman and the Rise of Nerd Culture, Glen Weldon does note that it is fair enough that yes, while certainly the writers and artists on the Batman books at the time were not intending to create gay imagery, they did end up doing so, but only TO gay people. For instance, if you were a young gay kid, there was something for you to see in the books, but it was not something that would, like, "turn" kids gay (obviously). As Weldon mentioned in a Slate article adapted from his book:
Remember: Queer readers didn’t see any vestige of themselves represented in the mass media of this era, let alone its comic books. And when queer audiences don’t see ourselves in a given work, we look deeper, parsing every exchange for the faintest hint of something we recognize. This is why, as a visual medium filled with silent cues like body language and background detail, superhero comics have proven a particularly fertile vector for gay readings over the years. Images can assert layers of unspoken meanings that mere words can never conjure. That panel of a be-toweled Bruce and Dick lounging together in their solarium, for example, would not carry the potent homoerotic charge it does, were the same scene simply described in boring ol’ prose.
And that's totally fair. It's like discussing what actually happened at the end of The Killing Joke. Authorial intent doesn't matter (outside of discussions about authorial intent, of course), read into it what you like. Grant Morrison certainly has read into the gay imagery of Batman, as he explained in an interview with Playboy magazine:
Gayness is built into Batman. Batman is VERY, very gay. Obviously as a fictional character he’s intended to be heterosexual, but the whole basis of the concept is utterly gay. I think that’s why people like it. All these women fancy him and they all wear fetish clothes and jump around rooftops to get him. He doesn’t care—he’s more interested in hanging out with [Alfred] and [Robin].
So Wertham's point was not that Batman and Robin WERE gay, but that they represented an image that would inspire kids to pursue being gay. Of course, even there, he just flat out made things up to prove his point. The always awesome Dr. Carol Tilly looked into Wertham's many ridiculous pieces of "science" and one of the major made-up points was regarding Batman. From an article about Tilly's brilliant work in the NY Times:
Elsewhere in the book Wertham argues that the superheroes Batman and Robin represent “a wish dream of two homosexuals living together,” and cited a young gay man who says that he put himself “in the position of Robin” and “did want to have relations with Batman.”
But in Wertham’s original notes, Dr. Tilley writes, these quotations actually come from two young men, ages 16 and 17, who were in a sexual relationship with each other, and who told Wertham they were more likely to fantasize about heroes like Tarzan or the Sub-Mariner, rather than Batman and Robin.
"Yeah, we like the scantily clad male superheroes." "Really? Are you sure you don't prefer Batman and Robin? Come on, guys, give me something here!"
However corrupt Wertham's research was, it is clear that one of the main messages coming out of the release of the book was either "Batman and Robin are gay!" or "Batman and Robin are turning our kids gay!"
The response by the comic book industry to the negative attention that Wertham's work brought to their business, which eventually led to the United States Senate creating a Senate Subcommittee on Juvenile Delinquency, was to establish a self-censorship organization called the Comics Code Authority. It was obviously better for them to censor themselves than to allow the government to do so.
The Comics Code seal of approval began appearing on Batman comics in early 1955...
However, that was not the final response of National Comics (now DC) to the claims made by Wertham. In 1956, Detective Comics #233 introduced a specific response to the notion that Batman comic books were too "gay," by introducing Bat-Woman, a new superhero who would serve as both a foil and as a love interest for Batman for the next few years...
Amusingly, by the way, Batman had a regular love interest already in the comics since 1948 in the person of the Lois Lane riff, Vicki Vale, who, like Lois, was always trying to prove that Bruce Wayne was Batman. Of course, Bruce Wayne had had previous love interests (he was even briefly engaged in the early 1940s to a socialite named Julie Madison who broke up with Bruce when she became a successful actress).
Eventually, Robin was even given his own potential love interest with Bat-Girl...
So that was how the Batman titles dealt with the Comics Code for years under the editorship of Jack Schiff. However, the problem was that sales on the Batman titles were struggling in the early 1960s. Things got so bad that National decided to bring in a new editor to shake things up. Julius Schwartz took over the books in 1964 (along with Carmine Infantino as a new artist and also sort of a creative consultant) and one of the first things that Schwartz and Infantino did on the titles was to jettison most of the supporting cast from Schiff's era. That meant no more Bat-Woman or Bat-Girl.
However, even though it was now a decade past Seduction of the Innocent and the implementation of the Comics Code Authority, Schwartz still felt the same pressures that Schiff felt. He just dealt with them in a different fashion. Since Schwartz felt that the outlandish extra characters like Bat-Woman and Bat-Girl were too much, he decided that he wanted to spotlight the home life of Bruce Wayne and Dick Grayson and make a change. In other words, there were too many single guys in Wayne Manor. One of them had to go and Alfred Pennyworth drew the short straw (technicaly, he hadn't yet been given the last name Pennyworth).
In Detective Comics #328 (by Bill Finger, Sheldon Moldoff and Joe Giella), Alfred dies saving Batman and Robin...
Batman decides to honor his old friend by establishing a charitable foundation in Alfred's name...
This foundation remains in the comics to this day, although it was later renamed the Wayne Foundation due to some events that occurred later that we will mention in a bit.
Just as Bruce and Dick were settling back into their lives without Alfred, things were thrown for a loop when Dick's Aunt Harriet shows up!
So yes, Schwartz's solution to prevent anyone from thinking of Bruce and Dick's situation as being too "gay" was to introduce Aunt Harriet to the comics for a female presence.
Hilariously, though, Batman was then picked up as a TV series a year later and the producer of the TV series, William Dozier, had read a few comic books from before Alfred's death as his inspiration for the TV show and so Dozier very much wanted Alfred involved in the new program. So DC then had to come up with a way to bring Alfred back into the comic book series so that it would match the TV show.
Six issues after Alfred was killed (in a Gardner Fox-penned story), Batman and Robin discover a mysterious new villain known only as the Outsider...
The Outsider's identity remained a mystery, so when it came time to bring Alfred back to life, Fox decided to drop whatever his original plan for the villain was (frustratingly, Fox never recorded who he was going to have the Outsider turn out to be the first time around) and adapt it as a way to bring Alfred back. Thus, twenty-eight issues after Alfred died, we discover that the Outsider was actually Alfred the whole time! He was brought back to life and turned evil!
By the end of the issue, of course, Alfred's split personality was resolved and he was back to being the loyal servant of Bruce and Dick. Aunt Harriet remained on the scene, as well, but eventually she was written out of the titles just before the Batman books departed Wayne Manor entirely for a new Penthouse set-up in the late 1960s (after the TV series had gone off the air).
By the way, Batman's co-creator Bob Kane rather grossly weighed in on the whole debate in 1967. Paul Sann wrote a book that year called Fads, Follies and Delusions of the American People. Naturally, the "Bat-Mania" from the release of the Batman TV series the previous year played a part in the book. Sann discussed Batman with Kane and when Sann brought up the idea of homosexuality in the context of the Batman character, Kane had a rather visceral reaction...
Batman is the epitome of virility and manliness—just the opposite image of the fag. Wertham read homosexuality into this thing because I had a man and a boy living in a big house together—in the same bedroom—with just a butler and no female around. The doctor read homosexuality into it, through his eyes, but for that matter he also put down the WONDER WOMAN comic as a lesbian invention.
Kane then took credit for the introduction of Aunt Harriet (despite obviously having no input on the comic books when Schwartz and Infantino invented the character)...
It was all hogwash but I had to do something about it anyway. So I changed their bedrooms and I added Aunt Harriet—sort of a mother to both of them.
Before Kane finished things off with an awful conclusion...
Even so, I suppose the homosexuals like the TV show because of those tight outfits Adam West and Burt Ward wear. I imagine they sit around watching them on the screen and slap each other on the knees with the sheer joy of it all, but what can you do about that? I can’t change the characters because they weren’t homos in the first place and because you have to be crazy to fight success.
Stay classy, Bob Kane!
However gross Kane's comments were, they were obviously not too far off from what others at National Comics were feeling during the era, leading to the actual (thankfully temporary) death of Alfred.