The Hardy brothers eventually caught the eyes of the World Wrestling Federation (WWF). After being signed to a contract in 1998, they were trained by Dory Funk, Jr. in his Funkin' Dojo with other notable wrestlers such as Kurt Angle, Christian, Test, and A-Train. When the team was finally brought up to WWF television, after months of 'jobbing' and live events, they formed the acrobatic tag team called the Hardy Boyz. While feuding with The Brood in mid-1999, they added Michael Hayes as their manager. On July 5, they won their first WWF Tag Team Championship by defeating the Acolytes, but lost it back to them a month later. After the dissolution of the Brood, the Hardys joined forces with Gangrel as the The New Brood and feuded with Edge and Christian. This stable did not last long, however, and on October 17, 1999 at No Mercy, the Hardy Boyz won the managerial services of Terri Runnels in the finals of the Terri Invitational Tournament in the WWF's first ever tag team ladder match against Edge and Christian.
In 2000, the Hardy Boyz found a new manager in their real-life friend Lita. Together, the three became known as "Team Xtreme". They continued their feud with Edge and Christian throughout 2000, defeating them for the WWF Tag Team Championship on two occasions. At SummerSlam the Hardy Boyz competed in the first ever Tables, Ladders, and Chairs match (TLC match), for the Tag Team Championship against the Dudley Boyz and Edge and Christian, but were unsuccessful.
Hardy gained attention for his high risk stunts in the TLC matches in the year 2000, 2001, and 2002. He made a name for himself as one of the most seemingly reckless and unorthodox WWF performers of his time. In 2001, Hardy received a push as a singles competitor, and he held the WWF Intercontinental (defeating Triple H), Light Heavyweight (defeating Jerry Lynn) and Hardcore Championships (defeating Mike Awesome and Van Dam on two separate occasions). At the end of 2001, the Hardys began a storyline in which they began to fight, which led to Matt demanding a match at Vengeance, with Lita as the special guest referee. After Hardy beat Matt at Vengeance, while Matt's foot was on the ropes, Hardy and Lita began feuding against Matt. In the middle of the feud, however, Hardy faced The Undertaker in a Hardcore Championship match and lost. After the match, the Undertaker was scripted to attack both Hardy and Lita, injuring them. On the next episode of SmackDown!, the Undertaker also attacked Matt, also injuring him, in storyline. The Hardys and Lita were not seen again until the Royal Rumble, because WWE did not have another storyline for their characters. The Hardys later came back as a team, and there was never any mention of their previous storyline split.
In early April 2002, the Hardy Boyz began a feud with Brock Lesnar after Lesnar gave Matt an F-5 on the steel entrance ramp, which led to an angered Hardy seeking revenge on Lesnar. At Backlash, Hardy faced-off against Lesnar in his first televised match. Lesnar dominated Hardy and won the match by knockout. Lesnar and the Hardys continued to feud over the next few weeks, with the Hardys coming out victorious only once by disqualification. At Judgment Day, Lesnar gained the upper hand on the Hardy Boyz before tagging his partner, Paul Heyman, in to claim the win for the team. In July 2002, Hardy won his third Hardcore Championship by defeating Bradshaw.
After years in the tag team division, Hardy took on The Undertaker in a ladder match for the Undisputed Championship. Hardy came up short, but earned the Undertaker's respect. Hardy competed for singles titles on several occasions and defeated William Regal for the WWE European Championship. Hardy was defeated a few weeks later by Rob Van Dam in a match to unify the European Championship and the Intercontinental Championship, and the European Championship was dropped. Finally, the Hardy Boyz split apart, as Hardy continued to pursue his singles ambitions on Raw and his brother, Matt was drafted to the SmackDown! brand.In January 2003, he briefly turned into villainous after he attacked Van Dam and Shawn Michaels. It ended a month later when he saved Stacy Keibler from an attack by then-villain, Christian. In February, he had a brief program with Michaels, which saw the two team up. Then, in storyline, Hardy began dating Trish Stratus after saving her from Steven Richards and Victoria in March. Hardy and Stratus had a brief on-screen relationship that saw the duo talking backstage, kissing, and teaming together in matches. Hardy, however, was released from WWE on April 22, 2003. The reasons given for the release were Hardy's erratic behavior, drug use, refusal to go to rehab, deteriorating ring performance, as well as constant tardiness and no-showing events. Hardy also cites "burn out" and the need for time off as reasons for leaving WWE.
On August 4, 2006, WWE announced that Hardy had re-signed with the company. In the following weeks, vignettes aired hyping his return on the August 21 episode of Raw. On the day of his return, Hardy received a push and defeated then-WWE Champion Edge by disqualification when Lita pulled Edge out of the ring. After failing to capture the Intercontinental Championship from Johnny Nitro over the next few weeks, including at Unforgiven, Hardy finally defeated Nitro to win his second Intercontinental Championship on the October 2 episode of Raw. On the November 6 episode of Raw, Hardy lost the Intercontinental Championship back to Nitro, after Nitro hit him with the Intercontinental Championship title belt. One week later, Hardy regained it on the November 13 episode of Raw, with a crucifix pin. This marked Hardy's third reign as Intercontinental Champion.
On the November 21 episode of ECW on Sci Fi Hardy teamed with his brother, Matt, for the first time in almost five years to defeat the Full Blooded Italians. At Survivor Series, they both were a part of Team D-Generation X, which gained the victory over Team Rated-RKO with a clean sweep. The brothers then received their first opportunity since Hardy's return to win a tag team championship at Armageddon. They competed in a four-team ladder match for the WWE Tag Team Championship, but they came up short in their attempt. In the course of the match, however, they inadvertently legitimately injured Joey Mercury's face.
With Hardy still feuding with Johnny Nitro and the other members of MNM into 2007, he was challenged once again by Nitro at New Year's Revolution in a steel cage match for the Intercontinental Championship. Hardy once again defeated Nitro. Hardy then teamed with Matt to defeat MNM at both the Royal Rumble and No Way Out pay-per-views. The next night on Raw, February 19, Hardy was defeated for the Intercontinental Championship by Umaga. In April 2007, Hardy competed in the Money in the Bank ladder match at WrestleMania 23. During the match, Matt threw Edge onto a ladder and encouraged Hardy, who was close to the winning briefcase, to finish him off. Hardy then leaped off the twenty foot high ladder, drove Edge through the ladder with a leg drop, seemingly injuring both Edge and himself. The two were unable to continue the match and were removed from ringside on stretchers.
The next night on Raw, April 2, the Hardys competed in a 10-team battle royal for the World Tag Team Championship. They won the titles after eliminating Lance Cade and Trevor Murdoch. They then began a feud with Cade and Murdoch, with the Hardys retaining the Championship in their first title defense against them at Backlash and again at Judgment Day. The Hardys, however, dropped the titles to Cade and Murdoch on June 4 on Raw. The Hardys earned a rematch at Vengeance: Night of Champions but were defeated.
In the midst of feuding with Umaga, who defeated Hardy at The Great American Bash to retain the Intercontinental Championship in late July, Hardy was abruptly taken off WWE programming. He posted on his own website and in the forums of TheHardyShow.com that it was time off to heal, stemming from a bad fall taken in a match against Mr. Kennedy on the July 23 episode of Raw. He made his return on the August 27 episode of Raw beating Kennedy by disqualification after Umaga interfered. The following week, on September 3, Hardy successfully captured his fourth Intercontinental Championship by defeating Umaga for the title.This was the start of a push for Hardy, and at Survivor Series, Hardy and Triple H were the last two standing to win the traditional elimination match. Hardy began an on and off tag team with Triple H, which eventually led to a respectful feud between the two. The scripted rivalry continued at Armageddon, when Hardy defeated Triple H to become the number one contender for the WWE Championship. In the weeks leading up to the Royal Rumble, Hardy and Randy Orton engaged in a personal feud, which began when Orton kicked Hardy's brother, Matt, in the head in the storyline. Hardy, in retaliation, performed a Swanton Bomb on Orton from the top of the Raw set and seemed to have all the momentum after coming out on top in their encounters. Hardy, however, lost the title match at the Royal Rumble, but was named as one of six men to compete in an Elimination Chamber match at No Way Out, where he survived to the final two before being eliminated by the eventual winner, Triple H.During the March 3 episode of Raw, Hardy appeared on Chris Jericho's "Highlight Reel" segment as a special guest, but ended up attacking Jericho. This led to an Intercontinental title match on the following Raw where Hardy dropped the title to Jericho. Off-screen, Hardy dropped the title after he was suspended for sixty days, as of March 11, for his second violation of the company's Substance Abuse and Drug Testing Policy. Hardy was also removed from the Money in the Bank ladder match at WrestleMania XXIV after the suspension was announced. Hardy returned on the May 12 episode of Raw, defeating Umaga. This reignited the rivalry between the two, and they met in a Falls Count Anywhere match at One Night Stand, which Hardy won.
On June 23, 2008, Hardy was drafted from the Raw brand to the SmackDown brand, as a part of the 2008 WWE Draft. Hardy made his SmackDown debut on the July 4 episode, defeating John Morrison. Hardy participated in the WWE Championship Scramble match at Unforgiven and also challenged for the Championship at No Mercy and Cyber Sunday, but failed to win each time. He was originally scheduled to be in the WWE Championship match at Survivor Series, but, in storyline, was found unconscious in his hotel, allowing the returning Edge to replace him in the match and win the title. At Armageddon in December 2008, Hardy defeated the defending champion Edge and Triple H in a triple threat match to capture the WWE Championship, his first world heavyweight championship.
In January 2009, Hardy's next storyline led to his involvement in scripted accidents, including a hit-and-run automobile accident and an accident involving his ring entrance pyrotechnics. At the 2009 Royal Rumble, Hardy lost his WWE Championship to Edge after Hardy's brother, Matt, interfered on Edge's behalf and hit Hardy with a steel chair. The buildup to this feud involved Matt implying that he was responsible for all of Hardy's accidents over the past few months, and at WrestleMania XXV, Hardy was defeated by Matt in an Extreme Rules match. In a rematch at Backlash, however, Hardy defeated Matt in an "I Quit" match.
At Extreme Rules, Hardy defeated Edge to win the World Heavyweight Championship in a ladder match. Immediately after the match, however, CM Punk cashed in his Money in the Bank briefcase, which gave him a guaranteed world championship match at any time he wanted, and defeated Hardy to win the championship. Hardy received his rematch at The Bash, and won the match via disqualification, with Punk still retaining the title. At Night of Champions, however, Hardy won the championship for the second time, by defeating Punk. At the SummerSlam pay-per-view in August, Hardy lost the title back to Punk in a Tables, Ladders, and Chairs match. On the August 28 episode of SmackDown, Punk defeated Hardy in a steel cage rematch for the World Heavyweight Championship, resulting in Hardy being forced to leave WWE, in storyline, per the pre-match stipulation. This storyline was put in place to allow Hardy to leave WWE to heal his injuries, including a neck injury. Hardy also had two herniated discs in his lower back and was suffering from Restless legs syndrome.