WASHINGTON — Education Secretary Arne Duncan, who bonded with President Barack Obama years ago over their shared passion for basketball, is stepping down at the end of the year to return to his hometown of Chicago.

“Arne’s done more to bring our educational system, sometimes kicking and screaming, into the 21st century than anybody else. America’s going to be better off for what he has done,” Obama said at a White House press conference on Friday, where he introduced Duncan’s deputy, John B. King Jr., his choice to run the department.

Duncan, 50, told the Sun-Times he was not sure what he would do next. “I haven’t thought about it and I won’t for a while,” he said.

Obama lavished praise on Duncan and teased him about his basketball moves.

“Arne bleeds this stuff. He cares so much about our kids and he has been so passionate about this work, and everybody who interacts with him, including people who disagree with him on some issues, never questions the genuineness and heart that he has brought to this job. So I couldn’t be prouder of him and, for good measure, Arne holds the record for most points scored in an NBA All-Star Game.

“And he is my favorite partner in pick-up basketball. The smartest player I know, even though he’s very slow. And has no hops. He knows it’s true,” Obama said.

With Duncan’s departure, Obama will have just one original cabinet member left on his team: Agriculture Secretary Thomas Vilsack. Duncan was confirmed by the U.S. Senate on Obama’s Inauguration Day, Jan. 20, 2009, stepping up from his job as the superintendent of Chicago’s public schools.

Duncan started the transition to return to his former Hyde Park neighborhood earlier this year, when his wife, Karen, and their children, Claire and Ryan, moved back to Chicago.

The couple made the decision for Duncan to commute because Karen Duncan was offered a position at the University of Chicago Laboratory School – where she had been the athletic director before Obama was president — to become the assistant director of admissions for the Lower and Middle Schools.

When Duncan joined the Obama administration in 2009, the couple moved to a northern Virginia suburb and enrolled their children in a public school. The Duncan kids now attend Lab – from which Duncan graduated in 1982 — along with Mayor Rahm Emanuel’s children. The Obama daughters also attended Lab before Obama became president.

Duncan grew emotional at the press conference; his wife and children were in the front row as he mentioned his father, an educator at the University of Chicago and his mother, who started an inner-city tutoring program at 46th and Greenwood (not far from the Obamas’ home in Kenwood) which became a big influence on Duncan’s career choice.

Still, the commute took a toll on Duncan. In a letter to his staff, obtained by the Sun-Times, Duncan on Friday morning wrote: “So it’s with real sadness that I have come to recognize that being apart from my family has become too much of a strain, and it is time for me to step aside and give a new leader a chance.”

“I haven’t talked with anyone about what I’ll do next, and probably won’t for a little while — I’m simply returning to Chicago to live with my family. I imagine my next steps will continue to involve the work of expanding opportunity for children, but I have no idea what that will look like yet,” he said.”

Among the achievements Duncan’s team is touting as he departs is boosting the high school graduation rate to 81 percent and increasing the number of African-American and Latino students enrolled in college since 2008. Duncan in Obama’s first term presided over the distribution of billions of dollars in so-call “stimulus” funds, boosted community college and more recently, went on the attack against profiteering, unscrupulous for-profit schools.

Obama and Duncan connected some 20 years ago through their mutual friend John Rogers, the CEO and founder of Ariel Invesments, and former captain of Princeton University’s varsity basketball team. Rogers recruited Craig Robinson, the brother of first lady Michelle Obama, to play for Princeton; Duncan was a co-captain of Harvard’s team who played professionally in Australia, where he met Karen.

Back in Chicago, Obama started playing basketball with the group — Rogers said beginning about 20 years ago — and they grew close over their love of the game.

While at one point it seemed Duncan would stay until the end of Obama’s second term, his wife’ job offer changed his timetable, said Peter Cunningham, a former Assistant Secretary of Education whom Duncan brought to Washington from Chicago.

Cunningham, who now runs an education non-profit in Chicago, said in an interview: “Karen had a good career opportunity and Arne wanted to support her.”

Rogers said in an interview on Friday that Duncan “would be a natural to head a foundation. He’s so extraordinarily talented.”