A novel 2D InN/GaNlateral heterostructure (LHT) was simulated by stitching monolayer of 2D InN and monolayer of 2D GaN. The structural stability, electronic structure, and optical properties were systematically investigated using first-principle calculations and by considering the effects of strain. The results indicated that the designed heterostructure has a direct bandgap of 2.26eV which is further affected by applied biaxial strain. The bandgap of 2D InN/GaN lateral heterostructure decreases with the increase in biaxial strain, and tensile strain triggers a direct-to-indirect energy gap changeover at + 6%. Additionally, under compressive strain, heterostructure remains a direct bandgap semiconductor. Furthermore, the strain significantly affects the optical characteristics of lateral heterostructure. It has been noticed that the first optical absorption peak moves from 2.51eV (ɛ = - 4%) to 1.40eV (ɛ = 10%). Therefore, 2D InN/GaN lateral heterostructure provides an approachable way for utilizing in optoelectronic devices through the creation of in-plane lateral heterostructures. We performed all the computations using a self-consistent method based upon density functional theory. We used the PBEsol functional in the GGA to account for the exchange-correlation effects. We introduced a 10-Å vacuum region in the z-direction to avoid interaction between periodic images. We considered non-negligible weak dispersion correction in the lateral heterostructure using Grimme's DFT-D3 approach. In this study, we also computed the electrical and optical properties employing the local modified Becke-Johnson (lmBJ) exchange potential under meta-GGA functional to obtain more precise results.