The service is being brought back into public ownership after a string of failures by Stagecoach and Virgin in recent years.
Mr Grayling’s decision marks the third time in under a decade that ministers have had to intervene on the line which was privatised in 1996 when Great North Eastern Railway took the ill-fated franchise.
Stagecoach and Virgin have run the franchise on a 90:10 split since 2015 and had already announced they would be handing it back to the Government three years early after admitting they had overestimated passenger numbers and suffered a revenue shortfall.
In a statement to the MPs, Mr Grayling denied the East Coast line was a failing rail service but admitted Stagecoach and Virgin stood to lose around £200m.
He told MPs the Virgin Trains East Coast partnership would be terminated next month and a new operator of last resort would take control under the London and North Eastern Railways brand.
He said the new LNER service will be a partnership between public and private sectors.
Shadow Transport Secretary Andy McDonald accused Mr Grayling of treating the opposition and the Commons with contempt after withholding his statement until half an hour before he delivered it.
He said: “Every announcement is a smokescreen to divert attention from the failings of the Transport Secretary’s policy.”
Critics of denationalisation fear the collapse of the franchise will cost taxpayers hundreds of millions of pounds.
Mr Grayling said in February that the financial outlook for Stagecoach had rapidly deteriorated in recent months, with the company incurring losses of almost £200m.
The Government had two options relating to the future of the East Coast mainline: nationalising the line temporarily or renegotiating a not-for-profit management deal with the two operators.
The Government had indicated it remained open to the possibility of allowing Stagecoach to keep the franchise until 2020 on a not-for-profit basis.
But ministers have ditched that option and opted instead to take “direct” control of the line.
The renationalisation of the line is expected to last for the next two years.
After 2020 the expectation is for the East Coast mainline to be operated on a new “public-private partnership model”.
Rail, Maritime and Transport union general secretary Mick Cash said: “This is the second time that 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. RMT will now be seeking an urgent meeting with the new operator to bolt down guarantees for staff on jobs, conditions and pensions.”