Sir Jonathan Jones has resigned as permanent secretary of the government Legal Department, the Attorney General's office has confirmed.
His resignation follows news earlier this week that the government was potentially plotting to row back on some Northern Irish aspects of the treaty.
The FT reports how "two Whitehall officials with knowledge of the situation" revealed Sir Jonathan was quitting his role after a "dispute" with Downing Street over its plan to implement legislation contrary to the Withdrawal Agreement, which was signed by the EU and UK in October last year.
The officials told the FT that the senior civil servant - the sixth to resign this year - was “very unhappy” about plans to override the Northern Ireland protocol, contained within the Withdrawal Agreement, and replace it with the Internal Markets Bill.
Downing Street confirmed that Sir Jonathan Jones has resigned but would not comment on the reason for the departure.
The Prime Minister's official spokesman said: "I can confirm that he is stepping down and we would thank him for his years of hard service and wish him well for the future."
Asked if Sir Jonathan signed off on the new Brexit legislation, the spokesman said: "It is for ministers to determine the legislation...
"We don't comment on the specific legal advice which ministers receive."
Critics of the move to override the Withdrawal Agreement have said it would breach international law if the UK reneged on its agreement.
Ursula von der Leyen, President of the EU Commission said the Withdrawal Agreement is a "prerequisite for any future partnership" and suggested there will be no trade deal if the UK does not stick to its side of it.
Ministers have claimed the UK is "committed" to implementing the Withdrawal Agreement, but the new legislation is being planned to "give legal clarity" if there "remains a few issues at the end of [talks]".
If implemented, the Internal Markets Bill would end the legal legitimacy of the Withdrawal Agreement in areas such as NI customs and state aid and financial assistance.
The PM's spokesman said: "We are taking limited and reasonable steps to clarify specific elements of the Northern Ireland protocol in domestic law to remove any ambiguity and to ensure the Government is always able to deliver on its commitments to the people of Northern Ireland."
A UK official added: "If we don't take these steps we face the prospect of legal confusion at the end of the year and potentially extremely damaging defaults, including tariffs on goods moving from GB to Northern Ireland."
Former prime minister Theresa May suggested the move to backtrack shows the UK cannot be trusted to uphold international agreements.
In the Commons, during a Urgent Question debate on the Northern Ireland protocol, Ms May criticised the move.
She said: "The UK government signed the Withdrawal Agreement with the Northern Ireland protocol - this Parliament voted that Withdrawal Agreement into UK legislation.
"The government is now changing the operation of that arrangement.
"Given that, how can the government reassure future international partners that the UK can be trusted to abide by the legal obligations of the agreements it signs?"
Northern Ireland Secretary Brandon Lewis replied: "The Withdrawal Agreement and protocol are not like any other treaty, it was written on the assumption that subsequent agreements could be reached between us and the EU on the detail. That is the entire purpose of the specialised joint committee and we continue to believe that that is possible, but as a responsible government we cannot allow businesses to not have certainty for January."
Lord Falconer, Labour’s Shadow Attorney General said "there must be something very rotten about this government" if Sir Jonathan has chosen to resign.
He added: "This resignation indicates that senior government lawyers think that the government are about to break the law. “The Government is trashing the best of the UK, we are a law abiding country and the Government have some serious questions to answer.”