Rodman dedicated the game to his "best friend" Kim, who along with his wife and other senior officials and their wives watched from a special seating area. The capacity crowd of about 14,000 at the Pyongyang Indoor Stadium clapped loudly as Rodman sang a verse from the birthday song.
Rodman said he was honored to be able to play the game in the North Korean capital and called the event "historic." Some members of the U.S. Congress, the NBA and human rights groups, however, say he has become a public relations tool for North Korea's government.
The government's poor human rights record and its threats to use nuclear weapons against rival South Korea and the United States have kept it a pariah state. Kim shocked the world in December by having his uncle, once considered his mentor, executed after being accused of a litany of crimes including corruption, womanizing, drug abuse and attempting to seize power.
Rodman, 52, has refused to address those concerns while continuing to forge a relationship with Kim, whose age has never been officially disclosed. The government did not say how old he turned Wednesday but he is believed to be in his early 30s.
At the start of the game, Rodman sang "Happy Birthday" to Kim, who was seated above in the stands at the stadium, and then bowed deeply as North Korean players clapped.
To keep it friendly, the Americans played against the North Koreans in the first half, but split up and merged teams for the second half.
The North Korean team scored 47 points to 39 for the Americans before the teams were mixed. Rodman played only in the first half and then sat next to Kim during the second half.
"A lot of people have expressed different views about me and your leader, your marshal, and I take that as a compliment," Rodman told the crowd. "Yes, he is a great leader, he provides for his people here in this country and thank God the people here love the marshal."
Rodman is the highest-profile American to meet Kim. He has carefully avoided getting involved in overtly political activities, saying that he is not a statesman and instead is seeking only to build cultural connections with the North through basketball that may help improve relations between Pyongyang and Washington.
Rodman has been slammed in particular for not using his influence with Kim to help free Kenneth Bae, an American missionary in poor health who is being confined in the North for "anti-state" crimes. In an interview with CNN on Tuesday, Rodman implied that Bae was at fault for being held captive.
Bae's sister, Terri Chung, said his family couldn't believe what Rodman said.
"Here's somebody who is in a position to do some good for Kenneth and refuses to do so," Chung told KOMO Radio in Seattle on Wednesday. "And then after the fact, instead, he decides to hurl these unqualified accusations against Kenneth. It's clear he has no idea what he's talking about. I'm not sure who he's talking to, where he's getting his information, but he's certainly no authority on Kenneth Bae."
The game is a new milestone in Rodman's unusual relationship with Kim, who inherited power after the death of his father in late 2011 and rarely meets with foreigners. He remains a mystery to much of the outside world and until recently, his birthday was also not widely known, though it was quietly observed elsewhere around the capital Wednesday.
Along with Rodman, the former NBA players included ex-All Stars Kenny Anderson, Cliff Robinson and Vin Baker. Also on the roster were Craig Hodges, Doug Christie, Charles D. Smith and four streetballers.
Members of the team, who average in their late 40s, said they came because they believed the game would be a good opportunity to create a human connection with the people of the isolated country. But some said they have been concerned by the negative reaction they have seen from the media and critics back home.
"This was a test of faith. We stepped out into the unknown," said former New York Knicks player Smith, who has played similar games in other countries and has acted as the team's spokesman to balance Rodman's famously outspoken character.
Smith said he was gratified to see the North Korean crowd enjoy the game, but he added that he had mixed emotions about the two-hour event.
"Emotionally, I don't know what to feel," he told The Associated Press afterward. "I'm indifferent. I'm not totally overjoyed."
Smith said he and the other players did not join Rodman in singing the birthday song.
"We always tell Dennis that he can't sing. He is tone deaf," Smith said. "He did it alone."
Associated Press writer Doug Esser in Seattle, Washington, contributed to this report.
Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.