This paper describes a novel multi-dimensional OCDMA coding technique with the objective of enhancing capacity of the optical communication network. In order to overcome the drawbacks associated with the conventional coding methods, multiple modes, time slots and multicarrier are utilized to construct the code set using prime sequences. The general procedure for code construction using the proposed method is described in this paper and the performance of the proposed coding technique has been analyzed for 36 users using 3 frequency channels and 5 fiber modes. By properly assigning 12 time slots to orthogonal group of users, the encoded data transmitted simultaneously by all 36 users have been correctly decoded without interference. The obtained results confirm the ability of the proposed method to improve the network capacity by supporting maximum number of concurrent users. Due to mode and frequency spreading, the data security against interceptor is also ensured in the proposed method than the conventional mode division multiplexing.