Density functional theory calculations were performed to investigate the catalyst-controlled selective functionalization of indoles with vinyl diazoacetates. The detailed reaction mechanism was established, and different roles of carboncation or carbene intermediates in defining an experimentally observed chemo- and regioselectivity were fully rationalized.