Theresa May was attempting to shore up her position in Number 10 by completing her Cabinet after a humiliating showing in the General Election left her authority as Prime Minister weakened.
He said: "I take responsibility for my part in this election campaign, which was the oversight of our policy programme".
Meanwhile, the Prime Minister has faced criticism for letting her advisers take the fall for the election.
He said the two were so close to the PM that critical MPs believed that, unless they made way, she would not be able to change her leadership style to adopt a more "outgoing, inclusive, responsive, empathetic approach".
Announcing his resignation on the Conservative Home website, Timothy urged Tory MPs to "get behind" May but said nothing should be allowed to get in the way of the process of forming a government and beginning Brexit talks.
In a statement after returning from Buckingham Palace, where she received the Queen's permission to form a government, May shrugged off a growing backlash in the Conservative Party, and said she would provide the "certainty" the country needed, The Guardian reported.
Charles Tannock, a Conservative member of the European Parliament, said the DUP was a "hardline, populist, protectionist" party and a "poor fit" as a partner for the Conservatives.
But he called reports that the policy was his brainchild "bizarre", saying: "It had been the subject of many months of work within Whitehall, and it was not my personal pet project".
"It's unacceptable for her to send sweary texts to cabinet ministers", said another member of the cabinet who described Hill telling a senior government figure to "fuck off".
Timothy had been widely blamed for the social care plan, over which May was forced to backtrack in the middle of the election campaign following signs it was hitting the party's core support.
May is now looking to rule the country with less than 50% of seats in Parliament's House of Commons, and is banking on support from the DUP to be the ally that helps her party push its agenda through Parliament.
In a short statement, Ms Hill said it had been "a pleasure to work with such an excellent Prime Minister".
Scottish Tory leader Ruth Davidson said she had demanded a "categoric assurance" that gay rights would not be affected by a deal with the DUP, which strongly opposes marriage equality.
'They only really know one way to operate - and that is to have enemies and I'm sure I'm one of them this morning'.
May came under fire during the campaign for the controversial policy on the cost of care for the elderly, dubbed the "dementia tax", and for making several U-turns on social care.
Mrs May was working on a Cabinet reshuffle, although the election result makes it less likely she will risk alienating colleagues by making wholesale changes as she can not afford to have disgruntled former ministers sniping at her from the backbenches.