The two ex-champs will then meet at featherweight in April.
Edgar defeated Penn at UFC 112 in April 2010 to win the lightweight title, beating him again in a rematch later that year at UFC 118.
The announcement was made Wednesday on the "UFC Tonight" TV show.
Tryouts for Season 19 of the reality TV show were held last month in Indianapolis for middleweights and light-heavyweights.
The 31-year-old Edgar (15-4-1) is currently ranked third among featherweight contenders. He is 1-1 since dropping to 145 pounds, with a win over Charles Oliveira and a loss to title-holder Jose Aldo.
The 34-year-old Penn (16-9) announced his retirement in the cage after being dominated by Canadian Rory MacDonald last time out in December 2012. The Hawaiian, who also once held the UFC welterweight belt, is 1-4-1 in his last six fights.