His Scottish trip came after SNP leader Nicola Sturgeon said Scottish voters would never forgive Labour if it allowed the Conservatives back.
The Tories said Mr Miliband's claim "changes nothing".
The Liberal Democrats have claimed the SNP views the election as a stepping stone to another independence vote.
Labour leader Mr Miliband said during a special BBC Question Time programme on Thursday evening that a Labour government is "not going to happen" if the price of power was doing a deal with the SNP.
He added: "I'm not going to sacrifice the future of our country, the unity of our country, I'm not going to give in to SNP demands around Trident, around the deficit or anything like that."
Mr Miliband has come under sustained pressure from the Conservatives throughout the election campaign over the prospect of a Labour-SNP deal in the event of a hung parliament.
Ms Sturgeon faced questions from a studio audience on BBC Scotland following Mr Miliband's appearance on Question Time.
She said: "I heard Ed Miliband and he sounded awfully like he was saying, and I hope that I am wrong about this because I think people across Scotland and much of the UK will be appalled if I am right, he sounded as if he was saying that he would rather see David Cameron and the Conservatives back in government than actually work with the SNP.
"Now, if he means that then I don't think people in Scotland will ever forgive Labour for allowing the Conservatives back into office."
Polls have suggested Labour is facing the prospect of a heavy defeat in its former Scottish stronghold, with the SNP on course to win the vast majority of seats.
During the Labour rally in Glasgow, Mr Miliband evoked the names of Labour's Scottish founder Keir Hardie and the architects of devolution John Smith and Donald Dewar, and ask Scots who their parents and grandparents would want to lead the country.
He urged voters in Scotland not to "gamble" on the SNP and insisted "you can guarantee change with Labour".
He said his opposition to any post-election deal with Nicola Sturgeon's SNP is for "principled reasons", adding: "We cannot do a deal with a party that wants to break up the UK when we want to build it up."
Mr Miliband said the UK "could be on the verge of electing a Labour government", and added: "Nationalism never built a school. It never lifted people out of poverty. It never created a welfare state that healed the sick and protected our most vulnerable.
Ms Sturgeon has made campaign stops in East Lothian, Dundee and Fife as she takes the SNP's message to communities around the country.
Speaking on BBC Radio 4's World at One, the SNP leader said: "The SNP is not going into Westminster to bring down governments or to stop budgets getting through.
"We would be going to try to get more progressive policies from a minority Labour government."
Elsewhere, Scottish Conservative leader Ruth Davidson joined Borders candidate John Lamont at a rally followed by a street stall event in Galashiels.
Ms Davidson said on Thursday that the choice facing voters in next Thursday's election was between "a party which will keep Scotland's economy strong and keep Scotland in the UK and a weak Labour government haggling with the SNP over how to run the UK".
Speaking in Leeds about Mr Miliband's assertion, Prime Minister Cameron said: "Is he really saying that if Labour don't get a majority but if Labour plus the SNP is a majority 'I won't be PM'? Of course he's not saying that.
"The threat today is the same as the threat yesterday. Ed Miliband propped up by the SNP not governing on behalf of the whole country."
Meanwhile, Scottish Lib Dem leader Willie Rennie met therapy animals as he revealed plans to boost mental health services.
Mr Rennie visited volunteers from Canine Concern in Edinburgh. The group's Therapet programme brings together pet owners with individuals struggling with mental or physical ill health.
Mr Rennie said his party would use their planned Â£800m investment in the NHS in Scotland to rebalance support between physical and mental health services.
On potential post-election deals, he said the voters faced a choice between a government influenced by UKIP's Nigel Farage, the SNP's Alex Salmond or the Liberal Democrats.
Mr Rennie insisted the Lib Dems would hold politics in the centre ground and help keep the economy on track fairly, and said Scotland needed to focus on the issues that mattered rather than a second independence referendum.
What are the top issues for each political party at the 2015 general election?
Policy guide: Where the parties stand
Ed Miliband has visited Scotland the day after appearing to rule out a deal with the SNP - even it meant putting the Conservatives in power.