- „Mad, bad and dangerous to know. That was him and that's me”
- —Dylan on Byron
During his time in high school, Dylan gradually befriended seven other students at West Beverly High who he would remain close to for years. However, he was also portrayed as a loner, prone to taking retreats and associating with only a few people at a time. Dylan is the son of Jack McKay, a man known for his wealth and a criminal past, and Iris, a spiritual and light-hearted woman who Dylan has little in common with. The family grew divided during Dylan's childhood; Jack and Iris divorced around 1981, and their son developed strained relationships with both parents. After later receiving a significant inheritance, Dylan became rich before graduating high school. He lived alone throughout a good portion of his time on the show.
Dylan is introduced as an intelligent, well-read teen mature beyond his years, but emotionally scarred by his upbringing, which leaves him hostile and unpredictable at times. In spite of tough circumstances, Dylan has something of a grounded nature and perspective on life, mostly assuming nothing about others and is very clear to Brandon about his moral compass – except when he is agitated (usually by his hapless parents) and he lashes out or closes off emotionally. Dylan meets Brandon Walsh and quickly takes to him, recognising Brandon's intelligence and again, more grounded nature, which Dylan considers a novelty in the superficial Beverly Hills world. Dylan soon meets Brandon's sister Brenda and falls in love with her.
Dylan's relationship with Brenda provides him with much needed love and comfort, add to the fact that they really care about each other and respect one another as individuals – in as much as Dylan is able to with his low self-esteem. Along with Brandon and Brenda, the Walsh parents also become a comforting fixture in Dylan's life, the first sense of family he had known in 10 years. With his mother AWOL and his father's neglect and abusive behavior, Dylan struggles with feeling safe and finding focus in his life, unable to take care of himself solely at 16. Dylan and Brenda become very close, while Brandon and Dylan become best friends. The trio look out for each other at all times and bring Andrea, Steve, Donna and Kelly into their soon-to-be friend group, later joined by Donna and David Silver.
A brief pregnancy scare marked the beginning of a highly stressful period for Brenda, which soon led her to break up with Dylan. Dylan's father was later arrested for a brief period of time, creating another painful experience for him in which Brenda attempted to provide comfort. His tendency to drink when stressed was also displayed during this period, which prompted the intervention of Brandon. Brenda and Dylan draw close once again when he was injured while surfing, with the two admitting that they missed one another. It was around this time that Brenda's parents, however, had become opposed to the relationship, leading to much antagonism. Further complicating the situation was the fact that Dylan shared a professional bond with Brenda's father, Jim Walsh — who Iris had selected as Dylan's trustee.
Dylan eventually decided that it would be best to let his own father oversee his assets, and Jack agreed. Despite their personal differences, Jim was uncomfortable with letting Dylan put his financial future in Jack's hands—though he merely cited the legality of their arrangement while blocking the change. Dylan and Jim moved back and forth on the issues of their personal and professional matters, finally settling into enmity. During this period, Dylan also briefly reunited with a friend and mentor named Jake Hanson.
While Brenda was in Paris during the summer, Dylan had an affair with their mutual friend Kelly Taylor. The feelings between Dylan and Kelly grew in spite of their reservations, as they'd known each other for many years. When Brenda returned, she and Dylan began growing apart due to new-found differences. After confirming that they'd both had flings during her time in Paris, the couple soon broke up. Dylan then began seeing Kelly, which quickly angered Brenda. After the girls had reconciled, Dylan was told to reach a choice between them. He eventually chose Kelly, when Brenda could not show up to his father's party because of her parents. Dylan and Jack faced a trying time following Jack's release from an incarceration. Though Dylan was at first emotionally detached from his father, the pair eventually reconciled and grew close once again.
Shortly afterward, a car bomb apparently took Jack's life after he'd resumed his criminal relations. Dylan was again tempted to soothe his pain by drinking, but thanks to some comforting words from David Silver, he was able to realize that it wasn't what he wanted. He soon learned that Jack had been collaborating with the FBI. Dylan was also comforted by Brenda who knew how to be there for him while Kelly tried but awkwardly failed. Dylan's mother, Iris, visited Beverly Hills to attend his high school graduation, which highlighted the two's comical differences, but ultimately left them on good terms. After feeling his dad's presence, Dylan later revealed that it seemed as though Jack was there with them throughout the day—to which Iris replied that perhaps he was.
Though their relationship was generally amicable throughout the fourth season, Dylan's tendency to decline Jim's advice would have consequences. After purchasing a new car against Jim's wishes, Dylan was soon carjacked—which resulted in him buying a gun and becoming obsessed with self-defense. Following a moment in which he came close to accidentally shooting Brandon, Dylan began to relent in this obsession. However, much more anxiety would follow. He soon learned that Brenda was involved with Stuart Carson, a young man who Dylan had a rocky past with and a less than high opinion of. Growing amounts of tension troubled his relationship with Kelly, due largely to differences over certain people in their lives. The biggest surprise of all came during Christmas when he met a woman named Suzanne, who introduced him to a younger child of Jack's named Erica. He was initially skeptical, having never heard of Erica before, but eventually invited the two of them into his life—along with Suzanne's partner Kevin. Jim, however, cautioned Dylan against being too trusting, particularly when the couple began making business proposals. Though Dylan initially heeded the warning, he ultimately declined Jim's advice once more, which would again prove to be a mistake. By the end of the season, Dylan had lost a girlfriend in Kelly, an adviser in Jim, and two new friends in Kevin and Suzanne, who departed the country after conning him (although at this point, he was unaware of this). In the final moments of the finale, however, Dylan shared a farewell kiss with Brenda, who'd opted to pursue stage acting in London.
Dylan fell into a downward spiral throughout the fifth season, largely because of Kevin and Suzanne's betrayal, and partly due to the knowledge that Brandon and Kelly were dating. He found temporary comfort in the arms of Valerie Malone, an old friend of the Walsh family's with a naughty side. After a period of drug use and reckless behavior enabled by his drug dealer, Mr. Trilling, Dylan eventually wound up in the hospital after a car crash while driving under the influence. A dream sequence during this period revealed that he viewed Jim and Cindy Walsh as ideal parents, Mr. Trilling as the devil, Valerie Malone as a Brenda-wanna be, and Jack McKay as a homeless vet. Dylan was watched over by Iris McKay and a med student named Jamie Young, who believed that Dylan's dreams were a struggle for his soul. After finally awakening, he began steps toward recovery by going to rehab.
While in rehab, he met Charlie Rollins, who he would eventually work with on a screenplay. They clashed in rehab, but later became friends after they both got out. With the help of J. Jay Jones, a private investigator recommended by Christine Pettit, Dylan, along with Valerie, would later pursue Kevin and Suzanne. The trio managed to reclaim the money they'd taken, and removed Erica from their custody following their arrest. After the fire, Kelly had gotten caught up in the New Evolution, a cult led by Patrick Finley. When Brandon's attempts to reach her failed, he hatched a plan with Dylan to free Kelly from their influence. Dylan went undercover and made a deal with Finley to buy him a new building if he convinced Kelly to marry him. When the plan worked, Dylan and Brandon freed Kelly from Finley. Following several sessions of hypnotherapy with Molly Campbell in which Dylan saw himself in past lives, Dylan came to realize that he wasn't over Kelly and believed there was a possibility that she was his soul mate.
A brief fling once again developed between Dylan and Kelly, despite her still being involved with Brandon. Dylan eventually invited Kelly on a romantic trip around the world, prompting Brandon to respond by proposing to her. She eventually chose neither, later stating that she didn't want to ruin Brandon and Dylan's friendship.
While playing action against Anthony Marchette, the man responsible for bombing his father's car, Dylan befriended Anthony's daughter Toni. Over time, he found himself developing genuine feelings for the young woman. Anthony opposed the romance and informed Toni of Dylan's vendetta, prompting Dylan to reveal his side of the story when she confronted him. Toni initially didn't believe Dylan, but later discovered the truth. Dylan and Toni were soon engaged. Shortly before the wedding, Brandon read Dylan a telegram from Jim and Cindy, both of whom stated that they were proud of him. Brenda also sent a message expressing her affection.
After getting married, Dylan and Toni intended to leave Beverly Hills. Just before they could do so, however, Anthony attempted to have Dylan killed via a drive-by assassin, who accidentally shot Toni instead. Brandon stood beside a screaming Dylan as he cradled his wife's body. Tony and Dylan met for the last time in a private area at Toni's funeral. A devastated Anthony handed over a gun and told Dylan to kill him. Dylan ultimately refused, resisting the temptation, and walked away after stating that the killing was over. Brandon was present to see Dylan off as he left town, and the two friends shared a devoted handshake before Dylan drove quietly into the distance. This episode marked Luke Perry's departure from the show. Years later, Perry would reveal that the scene included some real-life sentiment between himself and Jason Priestley.
Following an off-screen reunion with Brenda, Dylan returned to Beverly Hills shortly after Brandon had departed. He would eventually learn that Anthony Marchette had committed suicide. In time he began to regularly interact with several of the group's new friends—entering a relationship with Gina, and helping Steve rescue an abducted Noah. Dylan, after returning to the Beverly Royale Hotel upon being evicted by his roommate, David, caught up with Jack's old friend, the hotel manager Hector. He also met an old friend named Lucy Wilson, who had lived in the hotel her entire life and knew Dylan from the old days. Through each other, they both realized how lost they both were and made a deal to return to college get some direction in their lives.
Dylan also got involved at a community center, where Andrew Emery was employed. After helping out there and with some issues with the center, Matt started realizing that Dylan was getting serious about getting his life together, but also about Kelly. Dylan later discovered that his father was alive after all, and had merely been under FBI protection for years. After first seeing Jack on video, the two men were briefly reunited in person. Jack then left town, returning to FBI protection and his new wife. Before Jack left he revealed that he had been living under the identity Eddie Waitkus and that he was married to a woman named Lisa and they had a son named Jack. Dylan and Kelly would eventually face rekindled feelings, and reunited by the time of the series' conclusion.