After teasing a retirement, Michaels returned to WWF at the Royal Rumble match in 1996, which he wound up winning for a second year in a row, to receive a WWF Championship match in the main event at WrestleMania XII. Around this time, Jose Lothario became Michaels on-screen manager. At WrestleMania XII, Michaels defeated Bret Hart in the 'sudden death' overtime of their sixty minute Iron Man match, a match where the winner is determined by the number of scoring conditions by a certain time limit, which had ended in a 0–0 tie. On May 19, 1996 in an incident known as "Curtain Call: The MSG Incident," Michaels won a steel cage match, a match where the ring is surrounded by a steel cage, against Diesel. After the match ended, Razor Ramon, who was about to leave WWF to company rival WCW, came to the ring and hugged Michaels. Although Hunter Hearst Helmsley and Nash were seen as villains at the time, in contrast to Michaels and Hall, they were also members of The Clique, and joined in the good-bye hug as a group. The incident was seen as a rare breach in "kayfabe", the faux action and storylines that promoters wanted the fans to see as real. As WCW gained momentum due to the signings of Hall and Nash, Michaels held the championship for most of the year. Michaels' championship reign ended at the 1996 Survivor Series event, where he lost to Sycho Sid, his former bodyguard. Michaels recaptured the championship from Sid in January 1997 at the Royal Rumble.On a special episode of Raw dubbed Thursday Raw Thursday, Michaels vacated the WWF Championship; he explained to fans that he was informed by doctors that he had conjured a knee injury, and that he had to retire. His speech was regarded as controversial, as Michaels was allegedly unwilling to lose to Bret Hart at WrestleMania 13 (since it was noted that he was going to have a rematch with Hart at WrestleMania). Michaels contemplated thoughts of retirement and stated that he "had to find his smile again," which he had "lost" somewhere down the line. After knee surgery by Dr. James Andrews, Michaels returned a few months later, briefly teaming with Steve Austin to win the Tag Team Championship. In his autobiography, Michaels reveals about his real-life feud with Bret Hart, claiming that Bret did interviews on live television claiming that he [Michaels] was faking his whole injury.At SummerSlam, Michaels officiated the WWF Championship match between champion The Undertaker and Bret Hart. The match ended in controversial fashion, with Michaels hitting Undertaker with a chair (unintentionally, as he was aiming for Bret after he spat in his face). Michaels was then forced to award the championship to his nemesis, Bret Hart. At WWF One Night Only, held in Birmingham, England in September, Michaels defeated The British Bulldog to capture the European Championship. The fans at the event were so appalled at the result of the match they booed Michaels out of the building, to the extent that they littered the ring with rubbish. With this win, Michaels became the first Grand Slam Champion, a distinction made to a professional wrestler who has won all of the major titles in a promotion. During the 1997 SummerSlam event, a feud culminated between Michaels and The Undertaker, after Michaels struck The Undertaker with the usage of a steel chair. At the October pay-per-view event, In Your House: Badd Blood, Michaels and Undertaker participated in the first Hell in a Cell match, a match contested in a ring surrounded by a steel cage made of metal. During the match, it saw Michaels fall off the side of the 15-foot (5 m) high structure through a table and saw him as the winner in the match. The match received a 5-star rating from Dave Meltzer.In the summer, Michaels joined forces with real-life friend, Hunter Hearst Helmsley, Hunter's then-girlfriend, Chyna, and Rick Rude to form the stable, a group of wrestlers, D-Generation X (DX). Moving away from the family-oriented product, this marked the beginning of the WWF Attitude Era. Michaels continued his rivalry with Bret Hart and his reformed Hart Foundation, which was now a pro-Canada stable. Michaels taunted the group and Canada by engaging in acts, such as blowing his nose with and humping the Canadian Flag. Michaels later claimed the flag desecration was Bret's idea. Michaels' feud with the Hart Foundation culminated in a championship match at Survivor Series in 1997 against Bret Hart. Michaels came out of this match, dubbed by fans the "Montreal Screwjob", as the WWF Champion. Michaels now held both the WWF and European championship at the same time. Michaels, however, lost the European championship to group member, Hunter Hurst Hemsley, who often was referred to as Triple H (HHH), when he pinned him during a farcical match, making Triple H the European Champion.
At the 1998 Royal Rumble, Michaels received a legitimate back injury in a Casket match against The Undertaker, a match where the objective is to place the opponent inside a casket. Michaels took a back body drop to the outside of the ring and smashed his lower back on the casket, causing him to herniate two discs and crush one completely. This forced Michaels into retirement after losing the WWF Championship to Steve Austin at WrestleMania XIV.
Michaels returned to the WWF on November 23, 1998, but not as a wrestler; instead, he replaced Sgt. Slaughter as the WWF Commissioner, a portrayed match maker and rules enforcer, joining Vince McMahon's group of wrestlers called the Corporation as a villain. Throughout late 1998 and early 1999, Michaels made regular television appearances on Raw, in which he scheduled matches, throwing around his authority, and sometimes even deciding the outcome of matches. In early 1999, Michaels re-joined DX as a crowd favorite, but disappeared from WWF television for a few months to have back surgery, and by the time he had returned, DX had broken up.
Michaels made occasional appearances on WWF television as the commissioner during the spring and summer of 1999. Michaels was absent from WWF television until May 21, 2000 when he returned to officiate the Iron Man match between The Rock and Triple H. One month later, Michaels briefly reappeared to hand over the role of commissioner to Mick Foley and afterwards was absent from television for nearly a year. During this time, believing that his wrestling career was over, Michaels was interested in training individuals who wanted to become professional wrestlers. He saw potential in using his name and opening the Shawn Michaels Wrestling Academy, after his lawyer, Skip McCormick, suggested the idea. Michaels eventually left the academy. During this time, Michaels was a sportscaster for San Antonio's local news for a short time during his retirement.
In 2002, Michaels returned to wrestling and was brought into the New World Order (nWo) by Kevin Nash as a new member of the group. After the nWo had disbanded, Triple H appeared to make amends with Michaels. This was solidified when Michaels pleaded Triple H to return to Raw. Later on, they came down to the ring sporting their DX music and attire. When the pair was about to perform their trademark "Suck It" taunt, Triple H turned on Michaels by performing a Pedigree on him. Continuing the angle, a week later, Triple H attacked Michaels from behind in a parking lot and put his head through a car window, in storyline. In response, Michaels challenged Triple H to "a fight" (a non–sanctioned match) at SummerSlam, which Triple H accepted, laying the foundation for a rivalry that lasted for years. Michaels won at SummerSlam, but was attacked by Triple H with a sledgehammer after the match. At Survivor Series, Michaels won the World Heavyweight Championship from Triple H in the company's first-ever Elimination Chamber match, where the ring is surrounded by a steel structure of chain and girders. Michaels' reign as champion came to an end when he lost the championship to Triple H in a Three Stages of Hell match, a series of three matches in which wrestlers attempt to win the majority of matches, at Armageddon.Michaels then began a rivalry with Chris Jericho, after Jericho claimed that he was the next Shawn Michaels. On January 13, 2003, after Jericho won a battle royal, a multi-competitor match type in which wrestlers are eliminated until one is left and declared the winner, to select his entry number for the Royal Rumble, choosing number two in order to start the match with Michaels, who had already been named number one. At the Royal Rumble, Jericho, with the help of Christian (William Reso), eliminated Michaels. Michaels defeated Jericho at WrestleMania XIX. After the match, Michaels offered his hand to Jericho, who instead of shaking it, hugged Michaels. At first it seemed like good sportsmanship by Jericho until he quickly kicked Michaels in the groin.As a part of an ongoing feud with Triple H, the two competed alongside Chris Benoit in the main event match at WrestleMania XX for the World Heavyweight Championship. The former DX partners both came up short in the match, however, as Benoit had been scripted to win the championship. At Bad Blood in June, Michaels lost to Triple H in a Hell in a Cell match. Four months later, he lost a World Heavyweight championship match against Triple H, after Edge interfered at Taboo Tuesday, when the fans voted for him ahead of Edge and Chris Benoit to face Triple H one more time. Following this, Michaels was out of action for a few months with a legitimate torn meniscus.At the Royal Rumble in 2005, Michaels competed in the Rumble match and eliminated Kurt Angle. In seeking revenge, Angle re-entered the ring and eliminated Michaels, and thus placed him in an ankle lock submission hold, outside of the ring. Michaels issued a challenge to Angle for a match at WrestleMania 21, which Angle accepted when he appeared on Raw to attack Michaels. The following week on Raw, Marty Jannetty and Michaels had a one time reunion as The Rockers and defeated La Résistance (Robért Conway and Sylvain Grenier). Three days later on SmackDown!, Angle defeated Jannetty, after Angle made Jannetty submit to the ankle lock. To send a "message" to Michaels, Angle also humiliated Michaels' former manager, Sensational Sherri, when he applied the ankle lock hold on her. At WrestleMania 21, Angle defeated Michaels by submission, again with an ankle lock;The next night on Raw, Muhammad Hassan and Daivari came out to confront and assault Michaels. On the April 11 episode of Raw, Michaels approached authority figure Eric Bischoff, in which he demanded a handicap match with Hassan and Daivari, a match consisting of one wrestler or team of wrestlers facing off against a team of wrestlers with numerical superiority such as two against one, or three against two. Bischoff refused to schedule the match, but informed Michaels to find a partner and he would grant him the match. Michaels then made a plea for Hulk Hogan to come back and team with him. On the April 18 episode of Raw, Hassan again led an attack on Michaels until Hogan appeared to save Michaels and accept his offer. At Backlash, Hassan and Daivari lost to Hogan and Michaels when Daivari was pinned. On the July 4 episode of Raw, Michaels and Hulk Hogan had a tag team match, which they won. During the post-match pose, Michaels hit Hogan with his superkick, knocking Hogan to the ground and making Michaels a villain for the first time since returning in 2002. The following week on Raw, Michaels appeared on Piper's Pit where he superkicked Roddy Piper and then challenged Hogan to a match at SummerSlam. Hogan defeated Michaels at SummerSlam, and after the match Michaels extended his hand to him, saying "I needed to know, and I found out" and he and Hogan shook hands. Michaels left the ring to allow Hogan to celebrate with the crowd, and Michaels once again became a crowd favorite.
In 2006, a series of events took place which suggested a reunion of Michaels and Triple H as DX. They began at WrestleMania 22, where both Michaels and Triple H performed the crotch chop, during their matches. On Raw, the two continued to deliver chops, as Michaels feuded with Vince McMahon and Triple H went for the WWE Championship, repeatedly butting heads with Vince McMahon in the process. On the June 12 episode of Raw, DX officially reunited. During Triple H's gauntlet match, which had him compete against the Spirit Squad, a match consisting of two wrestlers beginning the match, and replacing whenever one is eliminated (by normal means), with the last person standing being named the winner. Michaels came in to help Triple H, and the two did the DX "crotch chops." At Vengeance, DX defeated the Spirit Squad in a 5–on–2 handicap match. They also defeated the Spirit Squad at Saturday Night's Main Event in a 5-on-2 elimination match and defeated The McMahons at SummerSlam. At Unforgiven, DX once again defeated the McMahons and ECW World Champion The Big Show in a Hell in a Cell match.
At Cyber Sunday, DX took on Rated-RKO (Edge and Randy Orton). The fan-selected referee Eric Bischoff allowed the illegal use of a Folding chair to give Rated-RKO the ill-gotten win and the plaudit of being the first tag team to defeat DX in a tag team match since their reformation in June 2006. At Survivor Series, however, Team DX emerged victorious against Team Rated-RKO. At New Year's Revolution, Triple H suffered a legitimate torn right quadriceps during their match with Rated-RKO. Rated-RKO claimed victory over DX, citing Triple H's injury, as the "end" of DX. On January 15, Michaels lived up to his word of "dealing" with Rated-RKO, from his comments the previous week before, when he took out Randy Orton with a con-chair-to after a handicap match against Edge and Orton.
On the January 29 episode of Raw, Michaels captured the World Tag Team Championship with WWE Champion John Cena after defeating Rated-RKO. He then defeated both Edge and Orton in a Triple Threat number one contender's match on another episode of Raw to earn a shot at the WWE championship. At WrestleMania 23, Cena retained the championship, after he made Michaels submit to the STFU. The next night on Raw, Michaels and Cena competed in two back-to-back ten team battle royals, winning the first and losing the titles in the second to The Hardys (Matt and Jeff) when Michaels threw Cena over the top rope. Michaels' feud with Cena continued and he faced off with Cena, Edge and Randy Orton in a standard wrestling match involving four wrestlers at Backlash for the WWE championship. Cena retained the championship when Michaels performed Sweet Chin Music on Cena causing him to fall on Orton, which gained Cena the pinfall.
Michaels then entered a feud with Randy Orton when Orton claimed that he could beat Michaels. The week before their scheduled match at Judgment Day, after Michaels won a match against Edge, Orton interfered, punting Michaels in the head. Orton assaulted Michaels again, just prior to their match at Judgment Day, interrupting Michaels' interview segment. Michaels collapsed during the course of their match, causing Orton to win by referee stoppage. Afterwards, Orton continued the beating, when he performed an RKO, a jumping cutter, to a fallen Michaels. Michaels was then removed out of the ring in a stretcher. During the feud, Michaels conjured a storyline concussion. This injury was used to keep Michaels out of action, as he required surgery for his knee. Michaels made his return on the October 8 episode of Raw, performing a superkick to newly-crowned WWE Champion, Randy Orton, during his title ceremony at the end of the show and then celebrating over the knocked-out champion as Vince McMahon watched. At Cyber Sunday, Michaels was voted by the fans to face Orton for the WWE Championship; though he won via disqualification when Orton hit Michaels with a low blow, which resulted in Orton retaining the championship. Michaels got another opportunity at the WWE championship, when he was granted his rematch against Orton at Survivor Series. In their match, Michaels was banned from using Sweet Chin Music upon request by Orton, referring to as Michaels superkicking Orton week after week. Michaels lost the match, when Orton performed an RKO for the win.
As part of the storyline involving Ric Flair, Michaels faced Flair in a Career Threatening match at WrestleMania XXIV, in which he won by performing Sweet Chin Music and thus ending Flair's career. Afterwards, Batista confronted Michaels about his actions at WrestleMania, calling him selfish and egotistical. The two faced off at Backlash with Chris Jericho as the guest referee. Michaels won after faking a knee injury and performing Sweet Chin Music. Jericho then confronted Michaels on this matter, in which Michaels admitted to faking the injury in order to defeat Batista. Michaels then defeated Jericho at Judgment Day. At One Night Stand, Michaels lost to Batista in a stretcher match, a match where the objective is to place the opponent on a stretcher at ringside and move it across a line located on the entrance ramp, thus ending their feud. On the June 9 episode of Raw, Michaels was attacked by Chris Jericho during his talk show segment, The Highlight Reel, being thrown directly through a television screen. The following week, it was revealed that, within the context of the storyline, Michaels had suffered a detached retina. At The Great American Bash, a match between Michaels and Jericho was scheduled, in which Jericho assaulted Michaels' eye, which caused Jericho to win by referee stoppage. A month later at SummerSlam, Michaels was scripted to announce his retirement from professional wrestling, though the staged rivalry between Jericho and himself continued after Jericho punched Michaels' wife in the face. On the August 25 episode of Raw, Michaels denounced his decision to retire and challenged Jericho to an unsanctioned match at Unforgiven, which Jericho accepted. The following week, Michaels and Jericho held a scripted official contract signing for the unsanctioned match. During the contract signing, a confrontation with Jericho occurred. A predicament ensued when Michaels suffered a small tear on his left triceps, though Michaels was medically cleared to compete in the match. At Unforgiven, Michaels defeated Jericho, after the referee stopped the match, due to the severity of the beating Michaels was giving Jericho. It was at the same September event that Jericho replaced CM Punk in the World Heavyweight Championship scramble match, which saw him win the match and become World champion. The following month at No Mercy, Michaels met Jericho in a ladder match in which Jericho defended the World title against Michaels. At the event, Jericho defeated Michaels to retain the title.
In December 2008, Michaels accepted an offer to become an employee of John "Bradshaw" Layfield (JBL). The storyline was that Michaels had lost his family's personal savings due to the global recession, forcing him to accept JBL's offer of employment. After failing to secure JBL the World Heavyweight Championship against John Cena at the Royal Rumble, Michaels agreed to take part in an "All or Nothing" match at No Way Out in February. Michaels won the match, letting Michaels out of his one-year contract with JBL immediately while still receiving full payment. Michaels became the first person to successfully defeat Vladimir Kozlov on the March 2 episode of Raw, and as a result earned the right to face The Undertaker at WrestleMania XXV in April. At the event, The Undertaker defeated Michaels to extend his WrestleMania winning streak to 17-0. After WrestleMania, Michaels took a hiatus from WWE.
Michaels returned to WWE programming in a series of segments that aired on the August 10, 2009 episode of Raw, where he had scripted left the WWE. Triple H met with Michaels at an office cafeteria in Texas where he was working as a chef; throughout the segments, Triple H would try to convince Michaels to return to WWE and reform DX. After several incidents during the segments, Michaels agreed to team with Triple H to face The Legacy (Cody Rhodes and Ted DiBiase) at SummerSlam. At the pay-per-view event, DX defeated Legacy.