Shamrock made his WWF debut on the February 24, 1997 episode of Monday Night Raw. On March 23, 1997, Shamrock, identified as Ken Shamrock and billed as "The World's Most Dangerous Man"—a name given to him by ABC News, refereed a submission match between Bret Hart and Steve Austin at WrestleMania 13.
Shamrock returned to the ring following WrestleMania, squashing Vernon White in his debut WWF match. He went on to feud with Vader, Bret Hart and The Hart Foundation throughout 1997, culminating in a bout between Shamrock and The British Bulldog at SummerSlam 1997 which Shamrock lost after refusing to relinquish a chokehold, following Shamrock going on a rampage after being slapped across the face by The British Bulldog with a handful of dog-food. Shamrock was considered a candidate to win the WWF Championship from the departing Bret Hart, before the Montreal Screwjob occurred. Shamrock went on to challenge Shawn Michaels for the WWF Championship at In Your House in December, defeating Michaels by disqualification after Triple H and Chyna interfered in the match.
Throughout early 1998, Shamrock feuded with WWF Intercontinental Champion The Rock. He lost to Maivia via disqualification at the 1998 Royal Rumble and a victory over Maivia at WrestleMania XIV was reversed after Shamrock continued to apply his ankle lock after Maivia had submitted. In June 1998, Shamrock won the 1998 King of the Ring tournament, defeating Jeff Jarrett in the semi-finals and Maivia in the finals. Following the King of the Ring, Shamrock feuded with Owen Hart, with Hart defeating Shamrock in a "Hart Family Dungeon match" at Fully Loaded and Shamrock defeating Hart in a "Lion's Den match" at SummerSlam. In September, he formed a short-lived stable with Mankind and The Rock.
Shamrock turned heel in October 1998 and won the vacant Intercontinental Championship on October 12, defeating X-Pac in the finals of an eight man tournament. In November, Shamrock consolidated his heel status by joining Mr. McMahon's Corporation. On December 14, Shamrock and fellow Corporation member The Big Boss Man defeated the New Age Outlaws for the WWF Tag Team Championship, making Shamrock a dual champion. The duo held the titles until January 25, 1999, when they lost to Jeff Jarrett and Owen Hart.
In January 1999, Shamrock began feuding with Billy Gunn, Goldust and Val Venis, all of whom had made overtures to his sister, Ryan. He lost the Intercontinental Championship to Venis on February 14 when Gunn, the guest referee, delivered a fast count. Shamrock took part in a four way bout for the Intercontinental Championship at WrestleMania XV. The reigning champion Road Dogg, was able to retain his title by pinning Goldust after Shamrock and Venis were counted out while brawling outside the ring.
In mid-1999, the Corporation began feuding with The Undertaker and his Ministry of Darkness, with The Undertaker's minions repeatedly ambushing Shamrock and kidnapping Ryan, sacrificing her on the Undertaker's symbol. After breaking away from the Corporation, thus turning face once more, Shamrock went on to feud with The Undertaker at Backlash and lost. In May, Shamrock, The Big Show, Mankind and Test formed The Union, a stable of wrestlers in opposition to the Corporate Ministry. The Union dissolved soon after defeating the Corporate Ministry at Over the Edge in May.
Shamrock briefly feuded with Jeff Jarrett before beginning a rivalry with martial artist Steve Blackman that saw he and Blackman fight one another in a series of unorthodox matches. The feud ended at SummerSlam 1999, where Shamrock defeated Blackman in a "Lion's Den weapons match". He went on to feud with the newly debuted Chris Jericho until departing the WWF in late 1999 in order to resume his mixed martial arts career. His departure was attributed to an injury inflicted by Jericho's bodyguard, Mr. Hughes.