A star slugger during the steroids era who was never tainted by accusations of drug use, Griffey appeared on 437 of 440 ballots in his first appearance on the Baseball Writers' Association of America ballot. His 99.3 percentage topped the previous mark of 98.84, set when Tom Seaver appeared on 425 of 430 ballots in 1992.
There had been speculation that Griffey could become the first unanimous selection.
"I can't be upset. It's just an honor to be elected, and to have the highest percentage is definitely a shock," Griffey said on a conference call.
Shortly after learning of Griffey's selection, Seattle raised a giant banner with his number on it to the top of the iconic Space Needle.Griffey's former Seattle Mariners teammate Jay Buhner hoisted the flag.
After falling 28 votes shy last year, Piazza received 365 votes in his fourth time on the ballot and will be inducted along with Griffey on July 24.
"Incredibly special. Wow," Piazza said on a call with MLB Network.
"I sat here with my mouth on the floor," he said.
In a conference call, Piazza put into perspective his wait to get into the Hall of Fame.
"Yogi Berra had like four ballots. Joe DiMaggio had three ballots," Piazza said. "And so myself being sort of a student of the history of the game, and having respect for the process, it was nail-biting at times, but I had a tremendous amount of support throughout my career from the writers and the fans."
The vote total dropped by 109 from last year because, under new rules, writers who have not been active for 10 years lost their votes.
Mark McGwire, who admitted using steroids, received 12 percent in his 10th and final ballot appearance.
"They were Hall of Famers before all this stuff started," Griffey said on MLB Network.
Half of baseball's top 10 home run hitters are not in the Hall: Bonds (762), Alex Rodriguez (654), Jim Thome (612),Sammy Sosa(609) and McGwire (583). Rodriguez, who served a yearlong drug suspension in 2014, remains active. Thome's first appearance onthe ballot will be in 2018.
Griffey was known by many simply as "Junior" as a contrast to his father, three-time All-Star outfielder Ken Griffey, who played alongside him in Seattle during 1990 and '91. The younger Griffey became a 13-time All-Star outfielder and finished with 630 homers, which is sixth on the career list. After reaching the major leagues in 1989, he was selected for 11 consecutive All-Star Games in 1990.
Now, he's headed to Cooperstown.
"In case you don't know, I'm really superstitious," he said. "I've played in the Hall of Fame game three times, and I've never set foot in the building. I've never even seen the front of it. The one time I wanted to go in there, I wanted to be a member."
Wanting to play closer to his home in Florida, he pushed for a trade to Cincinnati, his father's old team and the area he grew up in, after the 1999 season. But slowed by injuries, he never reached 100 RBIs again after his first season with the Reds, and he moved on to the Chicago White Sox in 2008 before spending his last season-plus with the Mariners.
While Griffey was selected first in the 1987 amateur draft and became the first No. 1 pick to make the Hall, Piazza was selected by the Los Angeles Dodgers with the 1,390th pick on the 62nd round in 1998. Since the draft started in 1965, the lowest draft pick elected to the Hall was John Smoltz, taken with the No. 574 pick in the 22nd round in 1985.
A 12-time All-Star with a .308 career batting average, Piazza became the top offensive catcher in big league history. He hit better than .300 in nine straight seasons and finished with 427 home runs, including a record 396 when he was in the game behind the plate.
After reaching the major leagues with the Dodgers in 1992, Piazza was dealt to Florida in May 1998 before he could become a free agent, then traded eight days later to the Mets. He remained with New York through 2005, hitting a memorable go-ahead home run in the first game in the city following the 2001 terrorist attacks, then finished with San Diego in 2006 and Oakland the following year.
Piazza and Bagwell were drawn into the steroids controversy by some who pointed out their powerful physiques, but both have denied using performance-enhancing drugs, and no substantive accusations have been made.
Alan Trammell received 41 percent of the vote in his final ballot appearance.
Information from The Associated Press was used in this report.