Kemp, who last played Grant Mitchell in 2006, said it would be "a brief return".
"When I was approached about returning to EastEnders for Barbara's final episodes, it was something I could not turn down," he said.
Following her surprise return to Albert Square, Dame Barbara announced her character would be killed off.
Her character reappeared on Friday, having left in 2010, to tell her eldest son Phil, played by Steve McFadden, that her cancer had returned.
After the episode, producers revealed that Peggy would die from the disease in emotional scenes to be screened in the spring.
Now Kemp, who played Grant from 1990-1999 and then again in 2005 and 2006, will return to bring the Mitchell family back together.
"Barbara is a very close friend, so when I learned of the storyline it felt right that the Mitchell brothers are reunited with their mother for the last time," he said.
"I am really looking forward to going back to EastEnders and filming what are set to be some classic EastEnders episodes."
Grant Mitchell has been one of the soap's most memorable characters in its 30-year history, arriving in 1990 along with brother Phil.
He was involved in repeated family dramas including having an affair with his brother's wife, Kathy, and having his brother go on to marry his ex-wife Sharon.
"Grant Mitchell is an EastEnders legend and finally he is returning home to Walford to say goodbye to his mother and be reunited not just with his old loves but also his brother," said EastEnders executive producer Dominic Treadwell-Collins.
"To have the Mitchell brothers come face to face again, having to face losing their mother, is an opportunity to show Ross Kemp and Steve McFadden at their very best."

The body said the suspensions - based on evidence from the McLaren report into state-sponsored doping in Russia - should stand until 31 October.
The six, including Sochi medallists, were named as having had urine samples tampered with at the 2014 Games.
The International Ski Federation (FIS) imposed the original ban in January.
"In the absence of any anti-doping rule violation having been assessed against any of the athletes so far, the temporary suspension shall lapse and the athletes shall be allowed to compete again," Cas said in a statement.
"A further provisional suspension may be imposed on the athletes by the International Ski Federation after that date, and would be subject to appeal."
The decision relates to athletes Alexey Petukhov, Evgenia Shapovalova, Maxim Vylegzhanin, Alexander Legkov, Evgeniy Belov and Julia Ivanova.
Legkov won gold in the men's 50km freestyle at the Winter Olympics in Sochi, with Vylegzhanin taking silver. The pair were also in the men's 4x10km relay team that won silver for Russia, while Vylegzhanin won a further silver in the men's team sprint.
Ross Kemp is returning to EastEnders as part of a storyline that will see Dame Barbara Windsor exit the soap for good.
[NEXT_CONCEPT]
Six Russian cross-country skiers have had their provisional doping bans upheld after a failed appeal to the Court of Arbitration for Sport (Cas).