"Aye," the 76-year-old Kennedy said in a loud voice, and he made a thumbs-up gesture as he registered his vote.
Spectators in the galleries that overhang the chamber burst into cheers - a violation of decorum that drew no complaints.
"It's great to be back. I love this place," he said after his brief visit.
Kennedy made his way into the Senate on his own power, appearing little the worse for his illness. A patch of scalp was clearly visible amid his familiar white hair, although it was not clear whether that was a result of surgery he underwent or the effects of chemotherapy that is part of his treatment.
He walked into chamber accompanied by Sen. Barack Obama, his party's presidential nominee-in-waiting, as well as fellow Massachusetts Sen. John Kerry and his own son, Rep. Patrick Kennedy of Rhode Island.
Democratic senators, who had been tipped to his presence, burst into applause when he entered. Some Republicans looked around quizzically, then joined in the applause when they saw Kennedy.
Kennedy's wife Victoria and niece Caroline Kennedy watched from the Senate gallery, reports CBS News correspondent Chip Reid. Victoria wiped away tears during the standing ovation, and Sen. Kennedy looked up and waved to her from the floor.
So did many of Kennedy's colleagues and several Senate clerks.
"Win, lose or draw, I wanted to be here. I wasn't going to take the chance that my vote could make the difference."
Officials said Kennedy left Boston immediately after his daily cancer treatment for a flight to Washington. He was expected to return home immediately, in time for Thursday's treatment.
Kennedy's dramatic return gave Democrats the impetus they needed to free Medicare legislation from gridlock. It had received 59 votes on an earlier test, one short of the 60 needed to advance. Kennedy made 60, and when Republicans saw the outcome was sealed, several of them joined Democrats to pad the margin. The House already has overwhelmingly approved the measure.
Lawmakers are under pressure from doctors and the elderly patients they serve to void a 10.6 percent pay cut for doctors treating Medicare patients. It kicked in July 1 because of a funding formula that establishes lower reimbursement rates when Medicare spending levels exceed established targets. Some doctors say they'll quit taking new patients if the cuts stand.
Officials said Kennedy left Boston immediately after his daily cancer treatment for a flight to Washington. He was returning home immediately, in time for Thursday's treatment.
"It was a very important day. This whole issue of Medicare is something that's been enormously important to me since I've been in the United States Senate," a smiling Kennedy told reporters on returning home Wednesday evening. "This was a key vote on this issue, so I was glad to be able to participate.
He said he was touched by the reception from colleagues.
"It's nice to be able to get a good round of applause from even those that you differ with from time to time," he said.
Asked what his doctors thought about the trip, he said, "Well, that's another story for another time."
One official said Kennedy has been in regular contact with Majority Leader Harry Reid, and had asked his doctors earlier this week whether he could make a quick trip to Washington. He told Reid on Tuesday he would be there.
Kennedy was last in the Senate in mid-May. He was diagnosed with a brain tumor this spring after suffering unexplained symptoms that resulted in his being taken to a hospital on Cape Cod, Mass., and then flown to Boston.
He later underwent surgery at Duke University Medical Center in Durham, N.C.,