The name may be derived from Dhammaramsi (the rays of Dhamma). This is the largest temple in Bagan. Dhammayangyi Temple is one the two temples which consist of four vestibules and two parellel corridors. The finest brickwork can be seen in this temple and its enclosure walls.
The temple is usually associated with King Narathu, who built the temple during his ruthless three years' tenure. The legend has it that he was killed by Indian mercenaries, who were sent by the king of Pateikkaya, which is a tributary of Bagan. The reason was to avenge for Narathu's murder of the chief's daughter, whom the chief had sent to Narathu's father, Alaungsithu, as tribute. Narathu did raise her as queen after killing his own father. Soon after that, he discovered her hatred toward him so he killed her with his own hands in one of his episodes of violence.