James Brokenshire quit as Northern Ireland Secretary for medical reasons as he acknowledged that forthcoming surgery would mean he could not give the "effort, energy and complete focus" needed for the role.
In his letter to Prime Minister Theresa May, Mr Brokenshire said an operation to remove a small lesion in his right lung meant he had to stand down.
Efforts to restore the power-sharing administration in Northern Ireland and the impact of Brexit on the island of Ireland mean that the role is demanding and sensitive and Mr Brokenshire said he had hoped to lead the "essential work with renewed intent" before his diagnosis.
In his letter to Mrs May he said: "I recognise that this comes at an important moment for politics in Northern Ireland."
There was an "urgent need" to restart stalled talks on the restoration of devolved government, he said.
"We are now well into overtime to re-establish an executive if further intervention in the day to day affairs of Northern Ireland is to be avoided."
Mr Brokenshire, 50, said he had been informed about the lesion "in the last few days" after a series of tests in recent weeks.
The Prime Minister appeared to hold out the prospect of a return to government for Mr Brokenshire, who had previously served under her in the Home Office with responsibility for security and immigration.
Mrs May said Mr Brokenshire had demonstrated that the role in the Northern Ireland Office was "vital work which will demand long hours, hard effort and complete focus" and it was "absolutely right that you should put your health first".
She told him he had performed with "great diligence, determination and good humour" in his government roles and "I know that you will approach your forthcoming operation in the same way".
She added: "I very much look forward to working alongside you again when you are back to full health."
Mrs May sent her best wishes to Old Bexley and Sidcup MP Mr Brokenshire, his wife Cathy and their three children.
"While it is typical of you that your first thought was not for yourself, but for your duties as a Cabinet Minister and public servant, it is absolutely right that you should put your health first, for your sake and that of your family," she said.