President Obama plans on Tuesday to name Gen. Joseph F. Dunford Jr., a former top commander in Afghanistan who now serves as commandant of the Marine Corps, to be the next chairman of the Joint Chiefs of Staff, according to officials briefed on the selection.

If he is confirmed by the Senate, General Dunford, 59, will take over the top military leadership position at a time of daunting challenges for the armed forces. It would fall to him to complete Mr. Obama’s troop withdrawal from Afghanistan by the end of next year while prosecuting a grinding air war against the Islamic State.

General Dunford would succeed Gen. Martin E. Dempsey, who is retiring after four years as the nation’s top general. General Dempsey was a favorite of the president’s and the go-to person at the Pentagon for White House officials who grew disenchanted with Chuck Hagel as defense secretary. Mr. Hagel has since been replaced by Ashton B. Carter.

It may be hard for General Dunford to duplicate the relationship General Dempsey had with Mr. Obama and his team, but the president is said to hold him in high regard as a strategic thinker who grasps the complexities of today’s world. Mr. Obama plans to make the announcement at noon on Tuesday in the Rose Garden.