The optimality of a class of entanglement witnesses constructed from any permutation for any bipartite systems is investigated. A necessary and sufficient condition is presented for such entanglement witnesses to be optimal, and thus, a class of optimal entanglement witnesses constructed by permutations is obtained.