The office of Law Minister Ravi Shankar Prasad received his resignation letter today.
He cited "personal reasons" behind his resignation.
He was appointed solicitor general in June 2014 after the Modi government came to power. His second term as solicitor general was renewed recently.
There was speculation a few months ago that the Supreme Court collegium was considering his name as a judge of the apex court.
Recently, Mukul Rohatgi had written to the government that he was not interested in a second term as attorney general.
Senior lawyer K K Venugopal was appointed as new attorney general.