Mr Gleeson is stepping down amid an ongoing public dispute with George Brandis over limits to the powers exercised by the Commonwealth's second law officer.
But as Kristina Kukolja reports, Labor says Mr Brandis has misled parliament over the issue and should be the one to go.
In a statement informing the Attorney-General of his intention to resign, Solicitor-General Justin Gleeson described his relationship with George Brandis as irretrievably broken.
He said the best interests of the Commonwealth can be served only when its first and second Law Officers enjoy each other's complete trust and confidence, adding he will take the necessary steps to resolve what he describes as the "impasse" between them.
Senator Brandis has accepted Mr Gleeson's resignation, saying it is the proper course of action.
Prime Minister Malcolm Turnbull agrees.
"I'd have to say that I thank the Solicitor-General for his service. I understand why he's made that decision to resign. I think he's made the right decision. It's always regrettable when people don't get on in the workplace, but that's been the case and he's made the right call. But I thank him for his work."
Justin Gleeson says his decision to stand down does not amount to a withdrawal of any position he has taken in relation to matters of controversy between them.
He says he trusts his resignation will enable the parliament to make an objective consideration of the issues he raised, undistracted by personalities.
The public disagreement between the two centres on claims by Mr Gleeson that he wasn't properly consulted before the Attorney-General instituted new rules requiring he approve all government requests for legal advice from the Solicitor-General.
Labor has argued Senator Brandis misled parliament when he said the legal directive had Mr Gleeson's support.
The matter was raised during a Senate Committee questioning by Senator Penny Wong.
Wong: "Why does the Attorney-General continue to deny that he has misled the Senate?"
Brandis: "Senator Wong, you rather make my point for me when you say that the instruction to the Department occurred both subsequent to the meeting of November 30 and subsequent to me receiving the Solicitor-General's written suggestions in March 2016. I have regard to both of those events. And, in my view, that constituted a consultation."
During the Committee hearing, Senator Brandis criticised Mr Gleeson for discussing the issue with opposition legal affairs spokesman Mark Dreyfus in the lead-up to the federal election, while the government was in caretaker mode.
Mr Dreyfus, though, doesn't believe his actions contributed to Mr Gleeson's resignation.
And he says the Attorney-General is the one who should go.
"George Brandis should be the one who resigned and, if he won't resign, Mr Turnbull should sack him. And I say that he should be sacked on the simple basis that Malcolm Turnbull himself outlined from opposition, which is that misleading the parliament is a very serious offence and the penalty for that offence is clear - it's that the minister should resign or be sacked. I've written to the Prime Minister today (tue) to ask him to ensure there is a transparent process for the appointment of the replacement for Justin Gleeson as the Solicitor-General."
Opinions are mixed over the issue at the heart of the disagreement.
Former Solicitor-General and retired Chief Justice Sir Anthony Mason has questioned the Attorney-General's decision regarding the Solicitor-General's powers.
"The Solicitor-General does not need a reference before he can provide advice to the entities. The Prime Minister might well seek the Solicitor's advice through the Attorney (General), but it seems a big stretch to say the Attorney-General has the power to say 'yes' or 'no' to the Prime Minister's request."
The Solicitor-General's resignation comes into effect on November 7th.
