Mr Fetterman received the news while in the hospital and said he is back from the procedure and was resting as he thanked voters.
“I just got out of a procedure to implant a pacemaker with a defibrillator in my heart. We got the all-clear that it was successful, and that I’m on track for a full recovery,” he tweeted on Tuesday night.
“Thank yinz for the well-wishes - it means the world to me. Now back to resting + recovering!” he added.
US president Joe Biden congratulated Mr Fetterman in a statement, saying electing him to the Senate “would be a big step forward for Pennsylvania’s working people”.
“Democrats are united around John, who is a strong nominee, will run a tough race, and can win in November,” Mr Biden said.
“Thank you *so* much for making me your Democratic nominee. Thank you for everything PA,” Mr Fetterman wrote in a tweet.
Mr Fetterman was absent from the election night event as he underwent a procedure in the hospital. He confirmed suffering a stroke on Friday and being treated at Penn Medicine Lancaster General Hospital.
“I hadn’t been feeling well, but was so focused on the campaign that I ignored the signs and just kept going. On Friday it finally caught up with me. I had a stroke that was caused by a clot from my heart being in an A-fib rhythm for too long,” he said in a statement, adding that doctors removed the clot.
His wife Gisele Fetterman attended the night event on his behalf and spoke to a cheering crowd after he was projected to win. She assured them he was recovering well and that “doctors were able to act quickly, and John is going to be back on his feet in no time”.
Mr Fetterman will face a GOP candidate in November.
Currently, the Republican field is split between Donald Trump-endorsed TV wellness celebrity Dr Mehmet Oz, former hedge fund executive David McCormick and conservative political commentator Kathy Barnette.
Mr Fetterman, who prefers shorts and hoodies over suits, said in a fundraising email to supporters: “If you’ll allow me to be brutally honest for a second, 2022 is going to be hard year for Democrats. A typical Democrat running a typical campaign isn’t going to win."
Mr Fetterman secured his party’s nomination after beating centrist US congressman Conor Lamb and state representative Malcolm Kenyatta.
During his campaign, he raised large sums of money and used his statewide name recognition to solidify his position for a seat that is especially important for Democrats because it represents a chance to pick up a spot previously held by a Republican.
Democrats, however, still have a tough road ahead as the Republican party still holds an advantage in most generic ballot polling for November.
Mr Cawthorn had been backed by former president Donald Trump.
Another Trump-endorsed candidate, US pepresentative Ted Budd, won the state’s Republican US Senate nomination.
He will face Democratic former state Supreme Court Chief Justice Cheri Beasley, who is looking to make history by becoming North Carolina’s first Black senator.