Paul Boateng, Chief Secretary to the Treasury, is to step down as a Labour MP at the forthcoming general election.
Mr Boateng was the first black cabinet minister
Mr Boateng, 53, is to become the UK's high commissioner to South Africa.
He was the UK's first black cabinet minister when appointed to his post in 2002, promoted from the Home Office, where he had been prisons minister.
Mr Boateng served on the Greater London Council before being elected to Parliament in 1987, declaring "today Brent South, tomorrow Soweto".
He will succeed the previous High Commissioner, Ann Grant, shortly after the next election, which is widely expected to be held on 5 May.
The appointment is dependent on Labour's re-election.
Prime Minister Tony Blair said: "Paul has been both a valued colleague and a trusted friend for many years.
"He has made an immense contribution to public life in Britain and I am delighted that he has agreed to continue that service to the people of Britain by acting as their representative in South Africa."
Chancellor Gordon Brown said: "Over the past eight years Paul's contribution to the Treasury and the government has been exceptional - and it has been my privilege to have worked closely with him closely at the Treasury.
"I congratulate Paul on his new appointment.
"He has displayed huge dedication to the cause of African development for many years and it is fitting that, in this year of challenge and opportunity for the African continent, Paul has been given such a pivotal role in our fight against poverty and injustice.
"I look forward to continuing to work with Paul on this vital agenda."
Mr Boateng said: "I am honoured to be asked to take on this role, especially as it comes at such an integral time for our relationship with South Africa and the African continent.
"There shall be many new challenges and opportunities ahead and I look forward to embracing them with great anticipation."
Asked if he was appointed as the result of a "fair and open" competition, he replied: "I have been appointed as a result of a process that's been used before by Labour and Conservative governments to appoint people of all parties who have relevant experience."
Mr Boateng also laughed off suggestions that his re-election in Brent South seat had been in danger saying it was "one of the safest Labour seats in the country".
Shadow foreign secretary Michael Ancram said that, if in government, he would refuse to approve either Mr Boateng's appointment or that of ex-Cabinet minister Helen Liddell as high commissioner to Australia.
"Mr Blair's appointment of Paul Boateng is the latest example of a worrying trend of failed Tony's cronies being appointed to senior diplomatic posts," he said.