Shanahan, who will meet US troops and Afghan President Ashraf Ghani on his first trip in his new role, said he had so far not received any direction to reduce the nearly 14,000 US troops in Afghanistan.
He also said the United States has important security interests in the region.
Ghani’s government has been shut out of the evolving peace talks between Taliban negotiators and USenvoys, with the hard line Islamist movement branding his government a US puppet. Kabul is also concerned that a sharp draw down of US forces could lead to chaos in the region.
“It is important that the Afghan government is involved in discussions regarding Afghanistan,” Shanahan told a small group of reporters travelling with him on the unannounced trip.
“The Afghans have to decide what Afghanistan looks like in the future. It’s not about the US, it is about Afghanistan,” he said.
Shanahan took over from Jim Mattis, who quit in December over policy differences with US President Donald Trump.
He said he could not make any guarantees because US peace envoy Zalmay Khalilzad was leading the talks.
“The US military has strong security interests in the region. (The) presence will evolve out of those discussions,” Shanahan said.
He also said his goal on the trip was to get an understanding of the situation on the ground from commanders and then to brief Trump on his findings.
US officials have held several rounds of talks with the Taliban in Qatar since last year in what is widely seen as the most serious bid yet for peace in Afghanistan since the Taliban were ousted by US-backed Afghan forces in late 2001.
Both sides hailed progress after the latest round last month, although significant obstacles remain. Those include the involvement of the Afghan government, which the Taliban refuse to acknowledge.
The next round of talks is due in Qatar on Feb. 25.
Michael Kugelman, a South Asia specialist at the Woodrow Wilson Center, said Shanahan’s main priority in Kabul should be to address Afghan government concerns.
“The top priority of Shanahan has to be to impress upon the government that we’re going to do everything we can to get you into this conversation,” Kugelman said.
Shanahan will also have to grapple with how much allies will trust him.
Mattis, a former four-star general once in charge of US Central Command, was respected for his deep knowledge of military and global affairs. Shanahan, a former Boeing executive and Mattis’s deputy, is seen as a relative outsider in foreign policy circles.
Afghanistan and neighbouring countries are also concerned about the effect a sudden withdrawal of US forces could have on the region.
An Afghan official, speaking on the condition of anonymity, told Reuters that even the suggestion of US troops potentially leaving was dangerous.
“Of course it has given leverage to the Taliban, there is no question about that,” the official said.
Trump has offered no specifics about when he would bring home the 14,000 US troops in Afghanistan but has said progress in negotiations with the Taliban would enable a troop reduction and a “focus on counter-terrorism”.
Shanahan said a withdrawal of about half the US troops in Afghanistan was not something that was being discussed at this point and he had not been directed to reduce troop numbers.
“The presence we want in Afghanistan is what assures our homeland defence and supports regional stability and then any type of sizing is done in a coordinated and disciplined manner,” he said.
Khalilzad said after six days of talks with the Taliban in Doha last month the United States and the Taliban had sketched the outlines for an eventual peace accord.
He has said since then there had been progress on the future of US troops in Afghanistan.
However, the Taliban have put out contradictory information on what timeline the US had agreed to in any potential withdrawal.
Most recently, a Taliban official said no timetable had been agreed with the US government for the partial withdrawal of US forces.
US officials have told Reuters that, while no formal orders have been sent, the military is preparing for what a withdrawal of about half of the 14,000 US troops in Afghanistan would look like.