Hagel also said he doesn't think more US pressure would be helpful in trying to persuade Afghan President Hamid Karzai to sign the agreement.
The US defence secretary had no plans to meet with Karzai during his stopover and it was not immediately clear what impact the visit could have on the standoff.
Hagel spoke to reporters after meeting with Defense Minister Bismillah Khan Mohammadi.
Karzai tentatively has endorsed the agreement and a council of tribal elders, the Loya Jirga, has said it should be signed by the end of the year, as the US has demanded.
The deal would allow US troops to stay in the country after 2014 to do training and some counterterrorism missions. Without a signed agreement, all US troops would leave at the end of next year, along with all foreign forces.
Joining Hagel at a briefing, the top US commander in Afghanistan, Marine Gen. Joseph Dunford, said he will keep planning for a post-2014 force. But, Dunford said, if the long-delayed deal is not signed before January, he will have to start planning for other options.