The declaration came moments after the second Test between South Africa and England ended in a draw.
South Africa's ODI captain AB de Villiers will be captaining the side in the remainder of the series.
The 32-year-old right handed batsman took over as Proteas' skipper from Greame Smith. Amla has been under pressure following his poor form which resulted in 3-0 Test drubbing against India.
Amla has led the side in 14 Tests - with four wins, six draws and four loses.
In the last 12 innings he played in 2015, the right-handed batter managed just 251 runs at a paltry average of 22.81. Thus he was under stiff pressure to perform.
Amla reckoned that he could be of greater value to the team as a 'fully focussed batsman' hence the decision to step aside.
In an official statement Amla was quoted as saying, "Naturally this decision is not an easy one but the more I think about it the more I believe I can be of greater value to the Proteas as a fully focused batsman and senior player at this time of rebuilding our team.
I am deeply grateful and privileged to have been the Test captain and I wish to thank CSA for the honour of captaining my country. It was enjoyable and indeed a great learning experience."
Earlier, the 2nd Test match played between England and South Africa ended in a draw.