Here’s a clear and informative text on the topic:
Despite his confession, the sadistic young King Joffrey orders Ser Ilyn Payne to execute Ned in front of a crowd in the Great Sept of Baelor. The episode’s title, "Baelor," refers to the location—the Great Sept of Baelor—where the beheading takes place. what episode does ned stark die
In short: