A general approach towards the synthesis of tetrahydro-4H-pyrazolo[1,5-a][1,4]diazepin-4-one, tetrahydro[1,4]diazepino[1,2-a]indol-1-one and tetrahydro-1H-benzo[4,5]imidazo[1,2-a][1,4]diazepin-1-one derivatives was introduced. A regioselective strategy was developed for synthesizing ethyl 1-(oxiran-2-ylmethyl)-1H-pyrazole-5-carboxylates from easily accessible 3(5)-aryl- or methyl-1H-pyrazole-5(3)-carboxylates. Obtained intermediates were further treated with amines resulting in oxirane ring-opening and direct cyclisation—yielding target pyrazolo[1,5-a][1,4]diazepin-4-ones. A straightforward two-step synthetic approach was applied to expand the current study and successfully functionalize ethyl 1H-indole- and ethyl 1H-benzo[d]imidazole-2-carboxylates. The structures of fused heterocyclic compounds were confirmed by 1H, 13C, and 15N-NMR spectroscopy and HRMS investigation.