Xiao Gang was born in 503, as the third son of Emperor Wu. His mother Consort Ding Lingguang () also gave birth to Emperor Wu's firstborn son and crown prince Xiao Tong, and therefore carried a special status within his palace even though she was never empress. In 506, at the age of three, Xiao Gang was made the Prince of Jin'an. As he grew in age, he was given a number of progressively higher offices. In 526, when Consort Ding died, he resigned those offices to observe a mourning period for her, but Emperor Wu restored him to those offices before the mourning period was over.