The Stagecoach-dominated firm will be replaced by a public sector "operator of last resort" which will revive the historic name London North Eastern Railway (LNER).
Vtec, which is the third private operator to hit financial difficulties running Scotland-London trains for bidding too much, was denied a new contract.
The franchise, which operates trains between Edinburgh, Aberdeen, Inverness, Glasgow and King's Cross, was operated by the UK Government from 2009 to 2015 after the last collapse.
Perth-based Stagecoach, which has a 90 per cent stake in the franchise, angered MPs by announcing the decision minutes before Mr Grayling made a statement to the House of Commons.
Mr Grayling said: "Stagecoach and Virgin Trains got their bid wrong and they are now paying a price."
However, he also said: "The route has its challenges but it is not a failing railway."
Services continue as normal, pre-booked tickets will remain valid, and staff will be transferred to LNER.
Vtec had struggled to repay the Â£3.3 billion it bid to run the franchise - twice as much as its two private sector predecessors, GNER and National Express, which defaulted on their contracts.
LNER, one of the classic "Big Four" railway companies, ran trains including the Flying Scotsman on the Edinburgh-London line from 1923 until nationalisation in 1948.
Mr Grayling said the decision had been "very finely balanced" between an operator of last resort and a new, non-profit contract for Vtec.
However, he said he wanted the "smoothest possible transition" to the planned new East Coast Partnership, which will run both trains and tracks on the route.
Perth-based Stagecoach said: "We have now been advised by the Department for Transport that the Secretary of State for Transport plans to announce today that he intends to appoint the 'operator of last resort' (OLR) to operate the InterCity East Coast trains services.
The company said it "had been negotiating a new direct award franchise with the UK Department for Transport but we understand the Secretary of State for Transport is no longer considering entering into a new franchise" with it.
Stagecoach Group chief executive Martin Griffiths said: "We are surprised and disappointed that the Department for Transport has chosen not to proceed with our proposals.
"We believe our plans offered a positive, value-for-money way forward for passengers, taxpayers and local communities, ensuring the continuation of the exciting transformation already underway on East Coast and a smooth transition to the Government's new East Coast Partnership.
"However, we respect the Government's decision.
"We will work constructively with the DfT and the OLR in the weeks ahead to ensure a professional transfer to the new arrangements, supporting our employees and maintaining the same clear focus on our customers as we have over the past three years.
"Today's decision should not detract from the hard work and dedication of our people at Virgin Trains East Coast, who have been central to the transformation we have been delivering for our customers over the past three years.
"During that time, we have attracted more passengers, greatly increased investment, achieved industry leading customer satisfaction and made significant payments to the taxpayer to reinvest in public services."
Anthony Smith, chief executive of the independent watchdog Transport Focus, said: "Whichever organisation runs East Coast services, under whatever new arrangements, passengers will be looking for the quality of current services to be maintained and built on.
"East Coast is currently the top-rated franchised train service in Great Britain – with 92 per cent overall satisfaction with the last journey in the latest National Rail Passenger Survey.
"While reliability must continue to improve, and promised and new investments made, passengers will continue to judge services by the performance on the day of the train company and Network Rail, value for money, cleanliness of the train and crowding levels.
"Having more stability in the underlying contract between Government and the train company will help achieve these things that matter most to passengers."
The RMT, the largest rail union, called for the switch back to the public sector to be made permanent.
General Secretary Mick Cash said: "This is the second time the Government have called upon the public sector to launch a rescue operation on the east coast main line, and instead of being a temporary arrangement Chris Grayling should listen to his staff and the public and make it permanent."After three shambolic private sector failures on the east coast, the message should now sink in that these cowboys cannot be trusted and should be locked out of the system on a permanent basis.
"Anything else risks playing out the same expensive farce over and over again."
Mick Whelan, general secretary of ASLEF, the main train drivers’ union, said it hoped Mr Grayling would now bring the rest of our railways into public ownership too.
He said: ‘It’s important staff and passengers are properly protected while, once again, the transport secretary tries to patch up a failing franchise system that everyone knows doesn’t work.
"Britain’s railways should be run, successfully, as a public service, not for private profit.
"Because they cannot do it."