The decision appeared to end a decades-long career that has seen him serve in top governmental posts and lead the country as prime minister.
At a hastily-announced press conference at the defence ministry in Tel Aviv, Barak, 70, said he would step down when the new government takes office after general elections on January 22.
"I have decided to resign from political life and not participate in the upcoming Knesset (parliamentary) elections," he said.
"I will finish my duties as defence minister with the formation of the next government in three months," Barak added, saying that he wanted to spend more time with his family.
"Politics is just one way of contributing to the state," he said, while declining to specify whether he might consider a return to government if he were hand-picked for an appointment by Netanyahu.
The prime minister said he respected Barak's decision and thanked him for the role he had played in his ruling coalition government.
"PM Netanyahu respects DM Barak's decision; thanks him for cooperation in government and appreciates his contribution to security of state," his office said on its official Twitter feed.
The shock announcement comes at a time when the Jewish state has been pushing the international community to pressure Iran over its contested nuclear programme.
Israel and much of the West believes the programme is an attempt to build a nuclear weapon.
Alongside Netanyahu, Barak has frequently warned that Israel could take pre-emptive military action to keep Iran from going nuclear, although he told a British newspaper last month that the moment of truth had been delayed for "eight to 10 months" until spring or summer 2013.
Ahead of Monday's press conference, observers had speculated the veteran politician and former head of Israel's Labour party would announce he was poised to join forces with ex-Kadima leader Tzipi Livni to run on a centrist ticket in the elections.
Livni resigned from politics earlier this year after losing her position as leader of the centre-right Kadima party to former defence minister Shaul Mofaz.
But few believed Barak would announce his retirement from political life altogether, in a decision which comes just days after the Israeli military ended a major air assault on Palestinian militants in the Gaza Strip.
The announcement caps a tumultuous couple of years for the former chief of staff, who had a stellar military career.
In January 2011, he resigned from the Labour party where he had spent his entire political life, to set up the Independence party, which he quickly led into Netanyahu's rightwing government.
But his new faction fared badly in recent polls and was not expected to win enough seats to make it possible for him to stay in the defence ministry post, which has long been coveted by members of Netanyahu's Likud party.
The premier had reportedly declined to guarantee Barak the post after the elections, in part because of intense pressure from within Likud.
In Netanyahu's hawkish government, Barak is regarded as a moderate, and he is particularly disliked by the settler faction of the coalition, which accuses him of stalling on new settlement construction in the West Bank.
Observers said Barak's departure could mean the next government, which Likud is expected to head, would be more rightwing, both on the Palestinian issue and Iran.