Here, Selective C3-formylation of indole was achieved under mild conditions using a metal-organic framework (MOF) catalyst. The confined reaction space within the MOF pores effectively suppressed undesired side reactions and promoted the formation of the targeted product by controlling the reaction pathway. Density functional theory (DFT) calculations corroborated the experimental observations.