Iodine catalyzed synthesis of indolizine-1-carboxylates through oxidative CC and CN bond formations by the reaction of 2-pyridyl acetates with alkynes and alkenes without metal, oxidant, and base. This procedure is compatible with a broad range of functional groups in both alkynes and alkenes with good yields. The reaction proceeds through a tandem CC bond formation followed by an intramolecular cyclization.