In order to face the shortcomings and problems, in spectral amplitude coding-optical code-division multiple access (SAC-OCDMA) systems, presented by multiple access interference (MAI) and its accompaniment phase-induced intensity noise (PIIN), limited capacity, etc., that prevent them to function effectively as well make performances poor. For these reasons, this paper offers a solution by proposing a novel encoding technique namely identity row shift matrix (IRSM) code based on an identity matrix and shifting property with target of beating the challenges aforementioned. Our proposed code is featured by zero cross-correlation (ZCC) property restricting the MAI effect as well neglecting PIIN which in turn positively reflects on system performance. Mathematical results appear the ability of IRSM code to improve the performance of SAC-OCDMA system as well outperform reported codes such as: diagonal permutation shift, (DPS), modified double weight (MDW), and random diagonal (RD) codes. For example, in term of system capacity, it amounts to 25, 48, 58, and 88, respectively, based on DPS, MDW, RD, and IRSM codes referring a remarkable enhancement. Additionally, mimic result demonstrates that IRSM code is suitable for attaining optical communication requirements through producing BER and Q-factor reach 10- 14 (≤ 10- 9 ) and 7.59 dB (≥ 6 dB ), consecutively.