Electrophilic addition of halogens to alkenes proceeds via a cyclic halonium ion to form a 1,2-dihalide or a vicinal dihalide.
Conjugated dienes react with halogens in a similar manner. However, in addition to the 1,2-dihalide, they also form a 1,4-dihalide. The mechanism involves two steps.
First, a nucleophilic attack by one of the diene π bonds on the electrophilic center of the polarized halogen molecule forms a halonium ion intermediate. This is followed by a nucleophilic attack of the displaced halide ion at C2 of the intermediate to give the 1,2-product or at C4 to form the 1,4-addition product. The ratio of the products formed depends on the reaction temperature. Low temperature favors the 1,2-product, whereas high temperature favors the 1,4-product.