Linear codes with large minimal distances are important error correcting codes in information theory. Orthogonal codes have more applications in the other fields of mathematics. In this paper, we study the binary and ternary orthogonal codes generated by the weight matrices on finite-dimensional modules of simple Lie algebras. The Weyl groups of the Lie algebras act on these codes isometrically. It turns out that certain weight matrices of sl(n, C) and o(2n, C) generate doubly-even binary orthogonal codes and ternary orthogonal codes with large minimal distances. Moreover, we prove that the weight matrices of F 4 , E 6 , E 7 and E 8 on their minimal irreducible modules and adjoint modules all generate ternary orthogonal codes with large minimal distances. In determining the minimal distances, we have used the Weyl groups and branch rules of the irreducible representations of the related simple Lie algebras.