"This is not a war without end, but success must be based on aligning our military and civilian resources behind a clear political strategy."
Underlining comments made by Gordon Brown on Monday, the foreign secretary said he hoped Afghan districts could start being handed over to local control next year.
Key elements of the strategy would be to reassure ordinary Afghans and encourage them to resist the Taliban while also seeking to persuade insurgents to pursue their goals "peacefully within the constitutional framework".
Mr Miliband said many Afghans feared that the international community would tire of the war and the Taliban would return "inflicting brutal retribution on those who 'collaborated' with the government".
He added that President Hamid Karzai - recently re-elected in a poll marred by fraud allegations - must offer a "new contract" with the Afghan people, including addressing corruption.
When he attends President Karzai's inauguration later this week, Mr Miliband said he would press him to turn "words into deeds" over his vow to improve governance.
'Strategy of strength'
Mr Miliband said he endorsed the arguments for "burden sharing" and a "serious counter-insurgency effort in Afghanistan".
He also called for closer work with Afghanistan's neighbours - specifically to help "squeeze the life out of the terrorist threat from both sides of the Afghanistan-Pakistan border".
Mr Miliband gave his speech after Mr Rasmussen warned that "if we were to walk away and turn our backs on Afghanistan, al-Qaeda would be back in a flash".
"There's absolutely no reason to think otherwise and anyone who does so is not living in the real world," the Nato chief said, urging other members to send more troops.
The UK has 9,000 soldiers in Afghanistan and is willing to send another 500 - if other Nato countries - excluding the US - providing a further 5,000 troops.
US President Barack Obama is to announce soon whether he will send additional US troops to Afghanistan.
For the Conservatives, William Hague told the BBC the important question was how Britain could get to the point where control could be handed over to the Afghan security forces.
It's only if we get theses things right that we can have these kinds of withdrawals and handovers to Afghan security forces
William Hague Conservatives
"That is where the world is waiting on President Obama in the next couple of weeks and that of course needs to be a strategy involving true counter-insurgency operations.. winning over the local population and the proper co-ordination of the civilian and economic effort behind the troops," he said.
"It's only if we get these things right that we can have these kinds of withdrawals and handovers to Afghan security forces."
Lib Dem foreign affairs spokesman Edward Davey said the messages being sent by Gordon Brown and David Miliband were "extremely welcome" but added: "Of course it is the detail we need to see and that's really why I say we need to wait to see what President Obama says."
He said there had to be a "political surge" with pressure on President Karzai to "clean up" and more political reconciliation - persuading insurgents to defect.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.