This paper introduces a new class of hexi codes namely, hexi polynomial codes, hexi Rank Distance codes, hexi Maximum Rank Distance codes, hexi Goppa codes and hexi wild Goppa codes. These codes are useful to create variants of the McEliece public key cryptosystem known as the hexi McEliece public key cryptosystem and its variants; these cryptosystems are secure against attacks carried out on the existing variants of the McEliece public key cryptosystem. This newly introduced cryptosystem has better error correcting capacity and lesser time complexity making it more feasible to use. The security and possible attacks on these variants of the hexi McEliece public key cryptosystem are analysed. The McEliece public key cryptosystem introduced by McEliece in the year 1978 (19), still remains unbroken. The public key cryptosystem is based on binary Goppa codes. Hexi codes were developed in 2013 for error correction in AES (14), further development of these codes is carried out in this paper. These codes are useful to create variants of the McEliece public key cryptosystem called the hexi McEliece public key cryptosystem and its variants. These public key cryptosystems are secure, have better error correcting capacity and lesser time complexity making it more advantageous to use. The organization of the rest of this paper is as follows. The history of the McEliece public key cryptosystem and its several variants are dealt in section two. Section three recalls hexi codes and introduces hexi polynomial codes, hexi Rank Distance (hexi RD) codes, hexi Maximum Rank Distance (hexi MRD) codes, hexi Goppa codes and hexi wild Goppa codes. The decoding, error detecting and error correcting capacity of these codes is discussed in section four. Section five introduces a few variants of the McEliece public key cryptosystems which are based on these new hexi codes; they are called the hexi McEliece public key cryptosystem and its variants. Section six deals with the possible attacks on the hexi McEliece public key cryptosystem and the resistance against these attacks. It also discusses the security of the cryptosystem. Section seven provides a comparison of the hexi McEliece public key cryptosystem with original McEliece public key cryptosystem, in terms of time complexity and error correcting capacity. Conclusions, suggestions and future direction of research are given in section eight.