Abe said he was receiving a new treatment for the condition but is expected to stay in office until his ruling Liberal Democratic Party can choose a successor.
Japan's longest-serving prime minister Shinzo Abe has resigned over a chronic health problem that has resurfaced, saying it was “gut-wrenching” to leave so many of his goals unfinished.
Abe's resignation will kick off a leadership contest in the world's third-largest economy.
"I have decided to step down from the post of the prime minister," he told a press conference on Friday, saying he was suffering from a recurrence of ulcerative colitis that ended his first term in office after one year in 2007.
Abe said he was receiving a new treatment for the condition, which needed to be administered regularly, which would not leave him with sufficient time to discharge his duties.
"Now that I am not able to fulfil the mandate from the people with confidence, I have decided that I should no longer occupy the position of the prime minister," Abe said.
“It is gut-wrenching to have to leave my job before accomplishing my goals,” he said, mentioning his failure to resolve the issue of Japanese abducted years ago by North Korea and a territorial dispute with Russia.
He said his health problem was under control until earlier this year but was found to have relapsed in June when he had an annual checkup.
Abe is expected to stay in office until his ruling Liberal Democratic Party can choose a successor in an election likely to take place among the party's lawmakers and members.
There is no clear consensus on who will succeed him, with likely candidates including Finance Minister Taro Aso and chief cabinet secretary Yoshihide Suga.
Abe, who stepped down as prime minister just one year into his first term, in 2007, offered his apologies for the second resignation.
"I would like to sincerely apologise to the people of Japan for leaving my post with one year left in my term of office and amid coronavirus woes while various policies are still in the process of being implemented," Abe said, bowing deeply.
READ MORE: Abe to extend national state of emergency
Key dates in his life and career:
September 21, 1954 – Shinzo Abe is born to parents who both came from political families, and his father, Shintaro Abe, later became foreign minister.
1979 – Starts working at Kobe Steel.
1993 – First elected as legislator from the southwestern prefecture of Yamaguchi.
2006 – Is elected leader of the governing Liberal Democratic party, making him prime minister.
2007 – Resigns as prime minister, citing health reasons.
2012 – Starts his second stint as prime minister.
2013 – Embarks on his “Abenomics” policies to encourage growth through easy lending and structural reforms.
2017 and 2019 – Holds meetings with US President Donald Trump, including golfing.
August 24, 2020 – Becomes Japan’s longest-serving prime minister by consecutive days in office, surpassing his great uncle.
August 28, 2020 – Abe announces he will step down, citing health reasons.