Cheshire West & Chester council said
The story about the Welsh being excluded from Chester after dark originated during the Glyndwr rebellion of 1403. Henry, Prince of Wales (future Henry V) was also Earl of Chester and on 4 Sept 1403 he ordered that all Welsh people and Welsh sympathisers should be expelled from the City; none should enter the city before sunrise or stay after sunset on pain of decapitation (not hanging, but it would have the same effect!). There are records of people standing surety for the good behaviour of Welshmen arrested under the order. The text books don't refer to anyone ever paying the maximum penalty for this 'crime'. Concern over 'the Welsh threat' continued into the 15th century and Chester was seen very much as a border town. There is no record that Henry V's order was ever repealed.
So it was not a freedom granted to anybody, but a wartime instruction to the City authorities soon after the Battle of Shrewsbury, similar to a selective curfew. In any case, within five years the citizens of Chester elected a Welsh mayor, John Ewloe, who did not arrest or execute himself.