Exploration of the cascade reactivity of diazo compounds with alkenes is a challenging and largely unmet goal. Herein, we disclose a light-mediated de novo synthesis of esterified heterocycles under mild conditions. The reaction displays a broad functional group tolerance, including a wide variety of alkenes, diazo compounds, and some bioactive molecules. Importantly, the synthetic appeal was demonstrated for synthesizing indoleamine 2,3-dioxygenase inhibitor analogue, the deethylated derivative of natural product leucomidine C, and the anti-inflammatory agent AN669.