For the first time, an arrayed-waveguide-grating (AWG)-based multiport optical encoder/decoder (E/D) and forward-error-correction (FEC) technique are applied in an optical code-division multiple-access (OCDMA) system. The AWG-based OCDMA E/D with high power contrast ratio between auto-/cross-correlation can significantly suppress the interference noises in an asynchronous OCDMA system without using ultralong optical codes and optical thresholder. A 12-user 10.71-Gb/s asynchronous OCDMA experiment has been successfully demonstrated to transmit ITU-T G.709 OTN frames including FEC.