In March 2018, McAfee was present at an NXT show in Indianapolis, where he prevented Adam Cole from winning by disqualification in his match against Aleister Black. Instead, McAfee's distraction was enough time for Black to recover and hit Cole with his finisher, Black Mass.
During 2018, McAfee began appearing on WWE programming as a pre-show analyst for the companies' NXT TakeOver events, beginning with NXT TakeOver: New Orleans. He later appeared at NXT TakeOver: Chicago II, NXT TakeOver: Brooklyn 4 and NXT TakeOver: WarGames. In December, it was reported that he had formally signed a multi-year contract with WWE, and officially signed the contract in February 2019. He then began hosting live watch-along of WWE's pay-per-views on YouTube, beginning with Fastlane, alongside a number of WWE wrestlers.
McAfee made a guest appearance on the November 1, 2019 edition of SmackDown, as part of an on-air staff filling in for Michael Cole and Corey Graves, where McAfee fully supported NXT's invasion of the show, and ultimately stormed the ring alongside the rest of the NXT roster at the end of the broadcast as they declared war on both Raw and SmackDown.
McAfee appeared in the August 5, 2020 episode of NXT, in an angle with Adam Cole, where they seemingly made up for their beef over the last few months. However, later in the night, as McAfee was a guest commentator in a tag team match between Bobby Fish and Kyle O'Reilly of the Undisputed Era and Fabian Aichner and Marcel Barthel of Imperium, Cole noticed McAfee at the commentary table and began to insult and attack McAfee, resulting in McAfee punting Cole's head. The next day, Triple H challenged McAfee to a match on behalf of Cole at NXT TakeOver: XXX, which McAfee accepted. At the event, McAfee, in his first match for WWE, was defeated. McAfee returned to NXT on October 21, 2020, interfering in a NXT Tag Team Championship match between Breezango (Fandango and Tyler Breeze) and Danny Burch and Oney Lorcan, resulting Burch and Lorcan in winning the NXT Tag Team Championships. A week later, Pete Dunne aligned with McAfee after appearing to help Kyle O'Reilly go up against McAfee, Burch, and Lorcan. In the next few weeks, McAfee was used in a managerial role, where he called out the absent Undisputed Era and instructed the other members of the stable in beatdowns of Breezango and the pairing of Killian Dain and Drake Maverick. On the November 18 episode of NXT, McAfee interrupted Finn Bálor mid-promo, and the show ended in chaos as the Undisputed Era made their return. Off-air, general manager William Regal came out from the back and sanctioned a WarGames match between the Undisputed Era and Team McAfee. On December 6, at NXT TakeOver: WarGames, in which McAfee notably hit a Swanton Bomb off the cage, ended in defeat when O'Reilly hit a diving knee drop through a chair on Lorcan, pinning him to win the match.
On the February 17, 2021 episode of NXT, McAfee made an appearance in a pre-recorded video, bragging that he was right about Cole all along, in the fallout from NXT TakeOver: Vengeance Day.
On April 16, 2021, WWE announced that McAfee had been moved to the SmackDown brand, where he replaced Corey Graves as a color commentator on the flagship Friday Night SmackDown program while Graves moved to Raw to replace Samoa Joe.
On the March 4, 2022 edition of SmackDown, Austin Theory announced that he was Pat McAfee's WrestleMania 38 opponent. After the announcement, he confronted McAfee, slapping him in the face and knocking off his headset. On the March 11 edition of SmackDown, McAfee attacked Austin Theory after Theory slapped McAfee for the second time, ensuing into an all-out brawl which ended with both Theory and McAfee getting escorted out of the arena. On the March 18, 2022, episode of SmackDown, McAfee was forced to apologize to Austin Theory to keep not only his match against him at WrestleMania 38, but also his job as a full-time commentator for SmackDown. Theory accepted the apology, but not without giving McAfee a shove. On the March 21 episode of Monday Night Raw, McAfee was a special guest commentator for Theory's match against reigning United States Champion Finn Balor. McAfee constantly distracted Theory during the match to the point where he was almost kicked from ringside. Theory was distracted long enough for Balor to get the pin on Theory and cost Theory the match. At WrestleMania, McAfee defeated Theory, then challenged Mr. McMahon to an impromptu match, which he lost following interference from Theory. After Stone Cold Steve Austin appeared and delivered Stone Cold Stunners to both Theory and McMahon, Austin invited McAfee back into the ring, only for McAfee to receive a Stunner as well.
On the June 17 episode of SmackDown, following his defeat to Madcap Moss, Happy Corbin would angrily confront McAfee, which lead to McAfee getting the audience to laugh at Corbin. The following week on SmackDown, McAfee would issue a challenge to Corbin to a match at SummerSlam. McAfee would end up defeating Corbin after hitting him with a low blow when referee Charles Robinson was down, then pinning Corbin with a sunset flip from the middle rope.
WWE announced on September 7, 2022 that McAfee was taking a temporary break from working for WWE due to prior obligations. At the 2023 Royal Rumble, McAfee made a surprise return for commentary right before the men's Royal Rumble match began, where he joined Cole and Corey Graves on commentary. McAfee didn't make another appearance until WrestleMania 39, challenging The Miz to a match, and then going on to win in under four minutes after Snoop Dogg made the match official.
On January 27, 2024, McAfee once again returned at the Royal Rumble as a surprise guest commentator. He was also a surprise entrant at number twenty-two in the men's Royal Rumble match, but eliminated himself due to fear of facing Omos and Bron Breakker. Two days later, McAfee made his full-time return to WWE on Raw as part of the new commentary team with Michael Cole.