AlGaN/GaN-based heterostructure field-effect transistors (HFETs) with and without Mg-doped semi-insulating carrier confinement layer were simulated by using ISE TCAD software, respectively. The detailed study on the electrical properties of these samples was performed. The effect of inserting Mg-doped GaN layer on the source–drain (S–D) leakage current was investigated. Higher values of drain current and extrinsic transconductance were achieved with conventional HFETs (without Mg-doped). The source-to-drain (S–D) leakage current of conventional HFETs was also higher. However, the S–D leakage current was reduced with the insertion of the Mg-doped semi-insulating carrier confinement layer. Our results are in good agreement with the experimental results obtained by other researchers.