Sir Ivan will leave his position over the coming weeks, a UK government spokesman confirmed on Wednesday.
A new permanent representative will be appointed shortly, "in line with normal procedures for diplomatic appointments."
Also a new deputy permanent representative will be chosen, said the spokesman.
Sir Ivan had been due to leave his position in October 2017.
In his resignation email, he said, "We do not yet know what the government will set as negotiating objectives for the UK's relationship with the EU after exit. […] Serious multilateral negotiating experience is in short supply in Whitehall, and that is not the case in the Commission or in the Council."
He urged his staff to "continue to challenge ill-founded arguments and muddled thinking."
The UK government spokesman said, "Sir Ivan has taken this decision now, to enable a successor to be appointed before the UK invokes Article 50 by the end of March."
Reaction to the news was swift, with Open Europe's senior policy analyst Vincenzo Scarpetta saying, "The timing of the decision is far from ideal. If the Government sticks to its original timeline for invoking Article 50, the Brexit talks will kick off at some point in the spring – once the other 27 EU member states agree on their own negotiating guidelines.
"This leaves limited time for finding a replacement and for the handover […] Nonetheless, we also need to put things into context […] the reality is that Sir Ivan was never going to be the UK’s lead negotiator in the Brexit talks. This role will be reserved for the so-called 'sherpas' of heads of state and government."
Scarpetta added, "While Sir Ivan's experience and knowledge would certainly have come in handy over the next few months, we should not exaggerate the possible consequences of his resignation for the government's negotiating strategy – let alone for the UK’s chances of securing a good deal."
Further comment came from UK Tory MEP Amjad Bashir who said, "Sir Ivan has a long and distinguished career as a diplomat and senior civil servant, but I always felt he was a little too much in tune with the philosophy and outlook of the European Union to make the best job of standing our corner.
"In leading David Cameron's pre-referendum negotiations I believe he accepted too readily what the Brussels elite told him was possible or not. Frankly, he left his boss in the lurch and at the same time showed the voters exactly what the EU is about.
"He was the wrong man for that negotiation and would be worse still for the Brexit talks. His heart would never be in it."
UKIP deputy leader and Brexit spokesman Gerard Batten said, "UKIP welcomes the resignation of Sir Ivan Rogers as the UK's ambassador to the EU.
"Sir Ivan had done the decent thing and stood down from an untenable position. If Mrs May were serious about leaving the EU she would have removed him long before.
"Sir Ivan is a Europhile who could be expected to represent Britain's national interest in the withdrawal process, which is long overdue in starting, and which now needs to be pursued in earnest.
"Mrs May should not fill this post with a new ambassador until we have repealed the European Communities Act (1972) and returned supremacy of law-making to the UK Parliament.
"She should instead appoint committed Brexiteers to posts of talking to the European Union about how Britain intends to leave, under our terms and under our law.
"Only when those matters are resolved should she appoint a new Ambassador to the EU. And that person should be there to represent Britain’s national interests to the EU, not represent the EU’s interests to Britain."