The Bab Mahrouq (the Burnt Gaate), the old name of this gate is Sharia Gate. Here body of the friend of Ibn Khaldun was burnt. After being murdered in his cell in Fes jail in 1374, his body was brought here and burnt to warn other people because he was accused of being a heretic.
The second story has another protagonist who is Al Oubeidi (a leader of Rif Ghomara tribe); an opponent of Sultan Al-Nacir Ben Youssef Al Mansour who was by his turn burned in this gate as a warning to all the opponents of the Sultan. So the change in name is attributed to those two people.