The first syntheses of privileged [5,6]-bicyclic heterocycles with ring-junction nitrogens by transition-metal-catalyzed C-H functionalization of C-alkenyl azoles is disclosed. Several reactions are applied to alkenyl imidazoles, pyrazoles and triazoles to provide products with nitrogen incorporated at different sites. Alkyne and diazoketone coupling partners give azolopyridines with various substitution patterns. In addition, 1,4,2-dioxazolone coupling partners yield azolopyrimidines. Furthermore, the mechanisms for the reactions are discussed and the utility of the developed approach is demonstrated by iterative application of C-H functionalization for the rapid synthesis of a patented drug candidate.