Malfoy was originally named "Draco Spungen" in the earliest drafts of Philosopher's Stone. "Spungen" also appeared on her pre-canon class list, but it was crossed out and replaced with the surname "Spinks", while "Malfoy" was later added after the completion of the list.
In Harry Potter and the Chamber of Secrets, Draco becomes the new Seeker for the Slytherin Quidditch team after his father, Lucius Malfoy, donates new, high-quality Nimbus 2001 broomsticks. When Hermione Granger comments that the Gryffindor players made the team through talent and not bribery, Draco responds by calling her a Mudblood. This provokes an immediate, violent response from all the Gryffindors present, except Hermione and Harry, who, having been raised by Muggles, do not know what the epithet means. Because of Draco's contempt for Muggle-borns, Harry, Ron, and Hermione suspect that Draco is the Heir of Slytherin, who has recently reopened the Chamber of Secrets. Harry and Ron disguise themselves as Crabbe and Goyle with Polyjuice Potion and infiltrate the Slytherin common room in an attempt to collect additional information, whereupon they realise that their initial suspicion about Draco is incorrect.
During Rubeus Hagrid's debut as Care of Magical Creatures instructor in Harry Potter and the Prisoner of Azkaban, the hippogriff, Buckbeak, attacks Draco after he insults it and fails to observe proper protocol while approaching it. He exaggerates the extent of his injury, giving Slytherin a chance to postpone their Quidditch match against Gryffindor until later in the year, and as an attempt to have Hagrid fired. Although Hagrid is cleared, Buckbeak is sentenced to death. Hermione slaps Draco when he mocks Hagrid for crying over Buckbeak's sentence. Draco also taunts Harry by needling him about the impending threat of Sirius Black: "If it was me, I'd want revenge. I'd hunt him down myself." Though irked by the comment, Harry does not give it much thought.
In Harry Potter and the Order of the Phoenix, Draco is named a Slytherin prefect along with Pansy. He gets Harry and the Weasley twins banned from the Gryffindor Quidditch team when they attack him during a postmatch brawl after Draco insults their families following Gryffindor's win over Slytherin. He later joins Dolores Umbridge's Inquisitorial Squad, with whom he plays an important part in the exposure of Dumbledore's Army. As the D.A. flees the Room of Requirement, Draco earns Slytherin fifty points after catching Harry, and helps hold several members captive in Umbridge's office. After his father and other Death Eaters are captured and sentenced to Azkaban following the events at the Department of Mysteries, Draco twice attempts to get revenge on Harry, but Snape and Minerva McGonagall thwart his first effort, and while returning home on the Hogwarts Express, Draco, Crabbe, and Goyle are transformed into giant slugs by a barrage of hexes cast by several D.A. members coming to Harry's defence.
Under the Invisibility Cloak, Harry, Ron, and Hermione follow Draco to Borgin and Burkes, a dark magic shop in Knockturn Alley. Draco threatens Mr Borgin about repairing one item and keeping another safe for him. Draco shows Mr Borgin something on his arm that Harry correctly deduces is the Dark Mark, Voldemort's sign. On the Hogwarts Express, Harry invisibly spies on Draco and overhears him discussing Voldemort's task with several other Slytherins. Draco knows Harry is present and, once alone in the compartment, immobilises him and breaks his nose. Harry is left stranded on the train until Nymphadora Tonks rescues him. Harry spends much of the year trailing Draco's whereabouts on his Marauder's Map, but loses track of him once Draco enters the Room of Requirement. When Katie Bell is almost killed in Hogsmeade after handling a cursed necklace and Ron nearly dies by drinking poisoned mead, Harry suspects Draco is behind both attacks.
In this book, Draco is, for the first time since being introduced in the series, portrayed as having considerable initiative, ingenuity, and perseverance, and he is extensively using the Room of Requirement. However, unlike Harry, who could always rely on his friends' support and help, Draco mostly works alone, refusing to confide in or involve his own circle, which he treated more as underlings rather than as friends. This, and the realisation as to what he is ultimately expected to do, nearly drives him to a nervous breakdown. He finds an unlikely confidant in Moaning Myrtle. When Harry walks in on Malfoy crying to Myrtle in her bathroom, Draco attempts to cast the Cruciatus Curse. Harry is faster to the draw with an obscure Sectumsempra spell that he learned from the mysterious Half-Blood Prince's book. The spell cuts deep gashes into Malfoy's face and chest, resulting in severe blood loss. Snape, alerted by Myrtle's screams, swiftly arrives and heals Draco's cuts, then takes him to the hospital wing.
Near the conclusion, Draco ambushes and disarms a gravely weakened Dumbledore at the Astronomy Tower. Dumbledore calmly reasons with the frightened Draco and persuades him to reveal how he was, according to Voldemort's orders, to kill the headmaster through the cursed necklace and the poisoned mead. Malfoy reveals that he mended the broken Vanishing Cabinet in the Room of Requirement to act as a portal enabling Death Eaters to enter Hogwarts. Draco is hesitant to kill Dumbledore, and he eventually lowers his wand. Snape arrives, dispatches Dumbledore himself, and then flees Hogwarts with Draco in tow. Harry, who was horrified by his attack on Draco in the bathroom incident, feels a twinge of compassion for his enemy when he realises that he was forced to do Voldemort's bidding under the threat of his and his parents' deaths. As revealed during his confrontation with Dumbledore, Draco was an insecure, terrified boy incapable of committing cold-blooded murder.
During an interview in 2005, Rowling revealed that she enjoyed writing Draco in this book, and that the character, "did a lot of growing up," as well.
When Harry, Ron, and Hermione seek Ravenclaw's diadem in the Room of Requirement, Draco, reunited with Crabbe and Goyle, attempts to capture Harry alive. However, Crabbe defies Draco's orders and attempts to kill the trio by casting the deadly Fiendfyre, but he dies in the blaze while the trio rescue Draco and Goyle. Draco, despite his often condescending and belittling attitude toward Crabbe and Goyle, grieves for his lost friend. During the Battle of Hogwarts, Draco is seen pleading with a Death Eater who seems intent on killing him, but is once again saved by Harry and Ron.
At about this time, it is revealed through the Pensieve that Dumbledore had known he was dying after being cursed by Voldemort's ring Horcrux. However, to spare Draco's soul from being forever tainted by committing murder, Dumbledore pre-arranged his own death. Voldemort intended Draco to die in the attempt to kill Dumbledore so that Lucius Malfoy would be punished for his failure to retrieve the prophecy from the Ministry.
Although Draco does not directly take part in Harry's final confrontation with Voldemort, he influences its outcome. After Harry is struck by the Avada Kedavra curse, Voldemort asks Narcissa to verify that Harry is actually dead. She detects his heartbeat, but she lies to Voldemort, knowing that she will be allowed to search for her son if the Death Eaters return to Hogwarts "as part of the conquering army." A plot twist reveals that Draco had unwittingly become the Elder Wand's master when he disarmed Dumbledore, even though Draco never actually possessed the wand. The wand's allegiance passes to whoever defeats its owner, so Harry, having taken Draco's wand at Malfoy Manor, became its new master; this prevents Voldemort from using its full power. In the end, it is Narcissa's lie to Voldemort concerning Harry's death that enables the Malfoys to narrowly avoid imprisonment in Azkaban.
In a July 2005 interview, Rowling added that Draco, unlike Harry, never feels any remorse for his actions: "I thought of Draco as someone who is very capable of compartmentalizing his life and his emotions, and always has done. So he's shut down his pity, enabling him to bully effectively. He's shut down compassion — how else would you become a Death Eater? Draco's character, ironically, provides a pivotal turning point in the storyline when he displays a rare moment of regret late in the series. Harry takes pity on Draco when he grasps the gravity of the expectations, including murder, with which Draco has been coping with as one of Voldemort's minions: "...suddenly, having talked the talk, he's asked to walk it for the first time and it is absolutely terrifying. Draco, as well as Dudley Dursley, was indoctrinated with his parents' beliefs; Rowling commented that "The moment Draco got what he thought he wanted, to become a Death Eater, and given a mission by Lord Voldemort, as he did in Harry Potter and the Half-Blood Prince, reality finally hit him" because his dream was "so very different". Rowling also stated that there was a real moral cowardice to Draco, but that he was not wholly bad.
When asked what shape Draco's Patronus Charm is, Rowling replied that, at least by the end of the sixth book, Draco was not capable of producing a Patronus as it is not magic routinely taught at Hogwarts.
The Malfoys are respected in the Wizarding world mainly from Lucius' influence with Hogwarts and the Ministry of Magic, gained mostly from his monetary donations to the Ministry and St Mungo's Hospital for Magical Maladies and Injuries, as well as from his post on the Hogwarts board of governors. However, he was removed from his position at the conclusion of the second book and imprisoned in Azkaban following the battle at the Department of Mysteries in Harry Potter and the Order of the Phoenix. Despite maintaining a respectful, but false, image before these events, some in the Wizarding world were previously aware that the Malfoys were devoted to Voldemort and the Dark Arts. Draco constantly uses his elite status and his father's name and influence to gain advantages and threaten others. Lucius is also known to have used bribery and threats.
Wizard rock band Draco and the Malfoys' lyrics are inspired by the Harry Potter books but from Draco Malfoy's point of view. One chorus goes: "My dad's always there to open all my doors, you have to call a Patronus just to catch a glimpse of yours/My dad is rich, and your dad is dead." As well as Harry and the Potters, the members of Draco and the Malfoys dress themselves as Hogwarts students, in this case in Slytherin-themed costumes. The band is one of about 200 bands of young musicians playing music inspired by the Harry Potter series.
Draco is parodied as Jerko Phoenix in the series Wizards of Waverly Place, during the episodes "Wizard School Part 1" and "Wizard School Part 2", in which Alex and Justin Russo go to a wizarding school named Wiz-tech, where everyone wears yellow and black robes, and glasses reminiscent of the scarred wonder.