The Democrat defeated Republican challenger Heather Heidelbaugh.
The race was called Friday with 97% of the precincts reported. Shapiro had a lead of 51%, 3,344,336 votes, to Heidelbaugh's 47%, 3,087,360 votes.
Shapiro has been a guest on multiple news shows in recent days, as he updates the status of the ballot counting across the state.
However, it was his son who became an internet star Friday night.
Shapiro was being interviewed by MSNBC from his home in Abington, Montgomery County - unbeknownst to his son.
During the interview, his teenage son walked into the room looking at his phone and then realized his father was on national television, stopped, and then walked backwards out of the camera's view.
The video posted on Twitter by Buzzfeed politics editor Matt Berman received more than 7,000 likes.
The attorney general responded to his son's newfound fame saying, "I'm taking his phone away for 24 hours," adding a laugh emoji.
I’m taking his phone away for 24 hours. 😂 https://t.co/1OYI8N4LwV— Josh Shapiro (@JoshShapiroPA) November 7, 2020
That tweet was was liked more than 38,000 times.
More high profile social media users reacted to the teen's impromptu television appearance.
"Supermarket Sweep" host Leslie Jones recorded the video off her TV with her own commentary. Jones even rewound to watch the moment again.
She tweeted, "YOOOOOO THAT IS FUNNY!! He didn't even flinch lol."
Shapiro tweeted back to the former "Saturday Night Live" star, "I can take the kid or the cuckoo clock out of the shot - but not both. Your choice."
The teen's sister even chimed in, "My brother is a meme now and I am here for it."
My brother is a meme now and I am here for it. pic.twitter.com/QeCNyJxaWF— Sophia Shapiro (@SophiaShapiro_) November 7, 2020
The scene was reminiscent, yet a tad a calmer, to what happened to a BBC guest expert back in 2017.
Professor Robert Kelly was being interviewed when his young children burst into the room.
RELATED: Hilarious moment as BBC live interview interrupted by two adorable kids
First it was a toddler performing a dance followed by a baby in a walker.
"Pardon me, my apologies," said the professor.
Including Shapiro, Pennsylvania voters are returning at least 17 incumbent members to Congress with one race undecided. They have also elected the first Republican auditor general in more than two decades.
Two more incumbent congressional Democrats won Friday, U.S. Reps. Susan Wild in the Allentown area and Matt Cartwright in Scranton.
The only uncalled congressional race in the state is in the Pittsburgh area, where U.S. Rep. Conor Lamb faces Republican Sean Parnell.
Republican Timothy DeFoor will be the state's next auditor general after outpacing Democrat Nina Ahmad.
Vote counting continues for state treasurer.
Republicans will keep majority control of both chambers of the General Assembly.
The Associated Press contributed to this report.