Ben Carson, who took Donald J. Trump on a tour of blighted neighborhoods in Detroit during the presidential campaign, including his boyhood home, has been chosen by Mr. Trump to oversee one of the government’s main efforts to lift American cities as secretary of the Department of Housing and Urban Development.

Mr. Carson, a retired neurosurgeon, was an early endorser of Mr. Trump after ending his own presidential bid.

“Ben Carson has a brilliant mind and is passionate about strengthening communities and families within those communities,” Mr. Trump said in a statement Monday morning. “We have talked at length about my urban renewal agenda and our message of economic revival, very much including our inner cities.”

“Ben shares my optimism about the future of our country and is part of ensuring that this is a presidency representing all Americans,” he added. “He is a tough competitor and never gives up.”