β-halogenated enol esters and ethers are versatile building blocks in organic synthesis, which has attracted increasing attention. In this study, we report the facile trans-oxyiodination and oxychlorination of alkynes, leading to the direct construction of versatile halogenated enol esters and ethers. This transformation features an easy operation, optimal atomic economy, a strong functional group tolerance, broad substrate scope, and excellent trans-selectivity. Employing highly electrophilic bifunctional N-X (halogen) reagents was the key to achieving broad reaction generality. To our knowledge, this transformation represents the first oxyhalogenation system employing N-X (halogen) reagents as both oxylation and halogenation sources.