The 35-year-old former two-weight champion McGregor has lost his last two fights and has not competed since July 2021.
The American Chandler welterweight match will take place after UFC 300 in Las Vegas, the UFC revealed on Saturday.
In his MMA career, McGregor has recorded 22 victories and 6 losses, while Chandler, 37, has a 23-8 record.
Pereira wins the title against Hill at UFC 300.
In July 2021, McGregor suffered a broken leg during his most recent battle against Poirier. Poirier had stopped him in the second round of their fight six months earlier.
McGregor has only ever won once since taking the UFC’s record as its first-ever simultaneous two-weight champ.