Panetta, 72, will replace Robert Gates, who retires as Pentagon chief on June 30, and Obama plans to recall talismanic General David Petraeus from Afghanistan, who will end a decorated military career to lead the CIA.
In another key move, Ryan Crocker, one of America's most tested diplomats, after tours in Pakistan and Iraq, will become ambassador to Kabul, charged with managing sometimes dysfunctional relations with President Hamid Karzai.
The overhaul comes at a pivotal moment in US foreign policy and will help shape Obama's approach to the unpopular war in Afghanistan, the NATO-led conflict launched last month in Libya and turmoil sweeping the Middle East.
Petraeus, who commands NATO's Afghan war operations and masterminded the successful Iraq troop surge strategy, will be replaced by Lieutenant General John Allen, deputy head of US Central Command, officials said.
A senior US official said that Obama had selected the "strongest possible team" of deeply experienced operators, all of whom face the task of handing security control to Afghans to eventually extricate America from Afghanistan.
Panetta, who will be the oldest man to take up the post of defense secretary and the first Democrat for more than a decade, may be one of the few men in Washington with the credentials and political weight to succeed Gates.
A holdover from the Republican administration of George W. Bush who emerged as a critical player in Obama's team, Gates forged a strong alliance with Secretary of State Hillary Clinton and was respected across political divides.
Panetta, a former White House chief of staff and California congressman, will need all his organizational wiles to implement Obama's demand for 400 billion dollars in budget cuts as he seeks to trim the huge US budget deficit.
All of Obama's appointees, to be formally unveiled at the White House on Thursday, require Senate confirmation, seen largely as a formality.
The immediate reaction to Obama's moves on Capitol Hill was warm.
"This team will provide the leadership to help make our nation safer," said Senator Lindsey Graham, an influential Republican on national security matters.
Peter King, Republican chairman of the House Homeland Security committee, said he strongly supported Obama's moves.
Senior administration officials dismissed suggestions the appointment of a top military officer would revive Washington turf battles between military and espionage professionals over strategy and the use of intelligence.
Crocker, who retired from the foreign service several years ago and has been in academia, will inherit a relationship strained by often testy exchanges between Karzai and current US Ambassador Karl Eikenberry.
"The president has nominated a person with deep experience in the region and tremendous experience and success with political military efforts," the senior official said of Crocker.
Apart from the top defense job, a number of crucial national security posts are coming open in the next several months, including the military's top officer, Admiral Mike Mullen, who finishes his term in September.
As for Petraeus, some former CIA officials and analysts have touted the general as a perfect fit for the spy agency, citing his work with intelligence operatives battling Al-Qaeda in Iraq, Afghanistan, Yemen and elsewhere, as well as his experience in Washington's policy debates.
Both Panetta and Petraeus will have to work quickly to win the trust of the large bureaucracies they will lead, some commentators said.
"Gates had deeply established relationships within the Pentagon -- a forebodingly complex hierarchy with a language and culture all its own," wrote David Rothkopf in Foreignpolicy.com.
"Panetta does not and will have a considerable learning curve and will need to work quickly to establish key alliances. Petraeus will need to do likewise with the notoriously prickly and defensive intel community."