General Dempsey, 63, who officially stepped down a week ago after four years as the military’s top officer, was expected to counsel Mr. Silver on matters of leadership and service, as well as to advise N.B.A. owners and executives on how franchises can connect with communities. He will also head a new leadership council for the league’s global youth basketball initiative, the Jr. N.B.A.
An official announcement from the league was expected to be made Friday morning. In a telephone interview Thursday, General Dempsey spoke about playing basketball while growing up and, later on, admiring its capacity to connect people.
“Basketball has always been a passion for the Dempsey family,” he said. “As I began to near retirement, I was approached about whether I would consider carrying that passion both for the game and leadership development into retirement. I was very eager to do so.”
He said his affinity for the sport grew in the late 1960s, when he was a fan of the Knicks as a young adult. He vividly recalled the 1969 playoff series between the Knicks and the Boston Celtics, which took place while he attended high school in Goshen, N.Y.
“I remember on my high school class trip to Washington, D.C., with this Panasonic transistor radio held up to the window of the bus,” General Dempsey said, “trying to desperately hear the latest on that series.”
Later on, in the 1970s, he played pickup games while serving on bases in Germany, and he noted the sport’s ability to unite men of different backgrounds and ethnicities there.
“There was a certain magic to putting athletes of mixed race on the court in those days, when frankly it was hard to do much else together,” General Dempsey said. “Basketball became an important venue in which kids could begin to better understand each other. It seemed to me to be a terrific springboard.”
After being appointed chairman of the Joint Chiefs of Staff in 2011, General Dempsey began working with members of U.S.A. Basketball and Coach Mike Krzyzewski, a fellow West Point graduate. In May 2014, General Dempsey and Mr. Silver promoted an N.B.A. initiative called Commitment to Service, which was intended to connect athletes and members of the military and help them contribute to their communities.
“We are honored to have one of our country’s most respected leaders, as well as a brilliant strategist, serve as our special adviser,” Mr. Silver said in a statement.
General Dempsey will assume his role on Jan. 1.
Two of General Dempsey’s children, Chris and Megan, played basketball at Army in the late 1990s, and he said he often missed being associated with the game after their careers concluded. Now he will be a member of the N.B.A.’s leadership team.
“Being a 41-year military veteran, you can’t help but pick up some leadership skills and instincts and understand how to connect with people,” General Dempsey said. “That’s what I hope to do.”