David Miliband planned to use his first speech as Labour leader to warn that the party's greatest danger lay in underestimating the challenge of the deficit - and that it was imperative to regain the public's trust on the economy.

The Guardian has obtained a final draft of the speech he planned to deliver if he had won the Labour leadership election last September, instead of losing to his brother Ed. The crestfallen former foreign secretary is said to have recited the speech to his wife in the back of his car on the drive home from party conference.

Its disclosure now caps a difficult week for Ed Miliband who has been battling criticism of his leadership and the embarassing leak of emails belonging to the shadow chancellor, Ed Balls.

The leadership speech that wasn't shows David Miliband intended to announce that Alistair Darling, the former chancellor, had agreed to head an all-party commission to draft a framework of rules on public spending and deficits designed to restore lost trust in Labour fiscal discipline.

He was to say that "step one" in recovering public trust over the economy "is to recognise what is obvious: that we did not abolish the business cycle. We should never have claimed it. You can't in a market economy. And public spending plans cannot depend on it. Nor can you write your own fiscal rules, and then be judge and jury for how they are calculated and when they are met."

Miliband has not spoken on sensitive domestic issues since his defeat, and his team has drawn a veil over how he intended to conduct his leadership, even though some of his supporters are still not reconciled to his defeat and remain frustrated at his brother's performance as leader. David Miliband's plans for a new fiscal framework and the boldness of his admission that the fiscal rules established by Gordon Brown as chancellor were wide open to manipulation, goes further than anything said by his brother, or Balls.

The draft, which circulated in the final days before the leadership result was announced in Manchester, says: "We should have been proposing the creation of the Office of Budgetary Responsibility and we should be campaigning today for its accountability to parliament to be strengthened. There is no point denying those things: they are true."

He planned to tell Labour's conference that the deficit "is the biggest argument in politics, and the biggest danger for us. George Osborne says we are in denial about the deficit. Because he wants us to be. So let's not be. It is a test."

He would have argued that "the party will only be trusted when we show in word and deed that the alternative to mean government is lean government".

Re-establishing fiscal credibility withvoters was the prerequisite for political recovery. He intended to say that "however much the coalition government are hated, we will not benefit until we are trusted on the economy, as we were in the 1990s".

In the speech David Miliband intended, in common with his brother, to defend public spending by Darling to prevent the recession turning into depression. The draft shows he was going to back Darling's plan to halve the deficit over four years.

The former foreign secretary has shown no interest in returning to frontline politics, and Ed Miliband's allies argue he has gone a long way to acknowledge that Labour made serious mistakes in economic policy and regulation.

Disclosure of the speech came separately as documents were leaked confirming the degree to which Balls was at the centre of plans in 2005 and 2006 to press Tony Blair to announce a date for his departure as Labour leader. Release of the documents appears to be designed to undermine Balls, and the product of a new split in the circle of former Brownites still influential in the party. Elsewhere in his speech David Miliband was to have said that in the 2010 election "we defined neither the question nor the answer, neither what we are for nor why we are needed. The party faced a mountain of suspicion and mistrust from the public."

He would have proposed creating a new post of party chairman, to be elected by this spring, saying "the party did not need a clause 4 moment, but a clause 1 moment" - a reference to a recasting of Labour party organisation.

He intended to allow local parties to offer cut-price membership if they could show they could boost membership. He was also hoping to announce that some loans to the party in the past decade were to be converted to grants.

Describing Labour as socialists not statists, the draft promised "no truck with the prejudice of public bad, private good, no hint of complacency when the public sector is bad".

The draft speech also contains a strong emphasis on responsibilities: "We will be the private sector reformers in the name of growth.

"No more timidity about the need for effective regulation, no more being outdone on effective welfare reform."

On another contentious issue he intended to say: "The biggest hole in our crime strategy at the moment is around drugs. I do not believe we are winning the war on drugs and and until we do we cannot win the war on crime."

Osborne was to have been accused of having "taken the biggest economic gamble in a generation … with other people's lives." It was Osborne that was in denial over jobs growth, "about the lives and livelihoods that depend on a growing economy".

The draft went on: "David Cameron says his economic plan will 'change our way of life'. What he means is you the nurse your way of life, you the pensioner your way of life, you the aspiring university student your way of life, you the housewife your way of life, you the construction worker your way of life … I guarantee you this: he doesn't mean his way of life."