In this study, a high-speed all-optical NAND logic gate (AO-NAND-LG) was designed and numerically simulated. The simulation was performed using the photonic crystal-semiconductor optical amplifier (PC-SOA) structure based on the Mach–Zehnder interferometer and nonlinear cross-phase modulation mechanism. The input optical pulse sequence used in the design was the return-to-zero type. Moreover, two PC-SOAs were utilized in the design of the NAND-LG. The rate and propagation equations were solved using the finite difference method. The optimal mode was achieved for NAND-LG with an energy value of 2.2 fJ for input pulse trains A and B, and an injection current of 1 mA at a bit rate of 80 Gbps. Furthermore, the impacts of the pattern effect, conversion efficiency, extinction ratio, and gain recovery on the design of the AO-NAND-LG were analyzed for the first time in simulations to enhance the performance and efficiency of the PC-SOA. Furthermore, the results demonstrated that the PC-SOA exhibited better logical performance than the ordinary SOA, and it is a suitable candidate for integrated optical circuits because it is much shorter than the SOA.