Chris Huhne has quit as energy secretary after learning he will be charged with perverting the course of justice over a 2003 speeding case.
His ex-wife Vicky Pryce will face the same charge in relation to claims she accepted his penalty points.
Mr Huhne, Lib Dem MP for Eastleigh, said he was innocent but would stand down to "avoid distraction".
Business Minister Ed Davey will replace him, but Nick Clegg said he hoped Mr Huhne could return to government.
Essex Police have been investigating the speeding points claims for eight months.
'I am innocent'
Director of Public Prosecutions Keir Starmer said the Crown Prosecution Service had concluded there was "sufficient evidence to bring criminal charges against both Mr Huhne and Ms Pryce for perverting the course of justice".
"The essence of the charges is that between March and May 2003, Mr Huhne, having allegedly committed a speeding offence, falsely informed the investigating authorities that Ms Pryce had been the driver of the vehicle in question, and she falsely accepted that she was the driver," he said.
Both are now due to appear in court on 16 February.
In a short statement outside his London flat Mr Huhne said the CPS decision was "deeply regrettable".
"I am innocent of these charges and I intend to fight this in the courts and I am confident that a jury will agree.
"To avoid distraction to either my official duties or my trial defence I am standing down and resigning as energy and climate change secretary. I will of course continue to serve my constituents in Eastleigh."
Lib Dem leader and Deputy Prime Minister Mr Clegg said Mr Huhne was "a good friend and close colleague" who had done "an outstanding job" as energy secretary.
"I totally understand and respect why Chris Huhne has stood down from his position in government to clear his name," he said.
"If he clears his name as he wishes to I have made it clear to him that I would like to see him back in government in a key position."
Mr Clegg's chief aide Norman Lamb will replace new Energy Secretary Mr Davey as a business minister, while Lib Dem MP Jenny Willott will become an assistant government whip. Jo Swinson has been appointed as Mr Clegg's parliamentary private secretary, to replace Mr Lamb.
In a letter to David Cameron tendering his resignation, Mr Huhne said it had been "an honour to negotiate and then serve in the first coalition government of modern times".
In reply, the prime minister wrote: "Like the deputy prime minister, I am sorry to see you leave the government under these circumstances and wish you well for the future."
Mr Cameron said Mr Huhne had "made the right decision given the circumstances".
"I want to thank him for the very good work that he has done in government, both in helping to bring the coalition government together and as secretary of state for energy and climate change.
"Obviously the government must continue so I have asked Ed Davey to step up to the cabinet as energy and climate change secretary, and I'm sure he'll do a very good job."
Business Secretary Vince Cable paid tribute to his Lib Dem colleague. He told the BBC: "I'm very sad. He's a very, very good, effective, colleague in government.
"I'm sure he will clear his name and we would certainly like to see him back."
Duncan Hames, Mr Huhne's Parliamentary Private Secretary, said: "I think in the circumstances he has done the right thing and he intends to fight to clear his name...
"Working with Chris over the last year he has been 100% focused on his job and he wouldn't want to go about important responsibilities as a member of the coalition government in any other way."
Mr Huhne and Ms Pryce divorced in January.
In a statement, Ms Pryce, an economist, said: "As the CPS have decided to prosecute it would not be appropriate to comment further at this stage. Obviously I hope for a quick resolution of the case."
Mr Huhne was one of five Lib Dem ministers in the coalition cabinet, in charge of issues such as energy market regulation and nuclear policy, and has also twice stood for the Lib Dem leadership.
Mr Huhne is the third cabinet minister to resign since the coalition was formed in May 2010.
Lib Dem David Laws quit as chief secretary to the Treasury after only 17 days over his expenses, while Conservative Liam Fox stood down as defence secretary in October 2011 after questions were raised about his working relationship with friend and self-styled adviser Adam Werritty.
Mr Huhne is entitled to a ministerial severance payment of £17,207. Asked whether he would be taking it, the prime minister's spokesman said: "That's a matter for him."