The world No. 3 wore Hamlin's number three on her shorts during her 6-2 7-6(5) victory over Belarus' Aliaksandra Sasnovich.
"I definitely wanted to do something," Pegula said after her win when asked about paying tribute to Hamlin.
"We were kind of figuring out what the Bills and the Sabres were doing, just as far as what was the message. I knew they would probably do something and what message were they trying to send. It ended up being kind of the '3' was the symbol."
Hamlin was hospitalized in Cincinnati when his heart suddenly stopped after a tackle during a game against the Cincinnati Bengals on January 2. The 24-year-old Bills safety was discharged after more than a week in hospital.
"I thought it would be a fun way to connect with the team and then also just show my support. I felt like it was a global event. A lot of people were asking me about it even here," said Pegula, who was in Sydney when Hamlin collapsed.
She said she watched the Bills' 34-31 Wild Card round win over the Miami Dolphins in Melbourne -- the Bills now face the Bengals in the divisional round, Buffalo's opponents on the night Hamlin collapsed.
Pegula also paid tribute to Hamlin after her 6-0 6-1 first round win over Jaqueline Cristian by writing "Go Bills #3" on the camera lens.
Pegula has had an excellent start to the new year after ending 2022 at a career high No. 3 in the world rankings.
She entered the Australian Open off the back of a superb performance at the inaugural United Cup where she led Team USA to victory. In the semifinals, she beat world No. 1 Iga Światek 6-2 6-2 who she is on track to face in the semifinals at Melbourne Park.
In her previous two appearances at the Australian Open, the 28-year-old has exited at the quarterfinal stage, but this year, she has her sights set higher. When asked about whether she could win the competition, she said: "That's the plan."
"Every tournament you want to take it one match at a time but, at the same time, you still want to have those big goals," she said. "Definitely going as far as possible these few weeks is my main priority."
Pegula will face either wildcard Olivia Gadecki or Marta Kostyuk in the third round on Friday.
™ & © 2023 Cable News Network, Inc., a Warner Bros. Discovery Company. All rights reserved.