The three-dimensional (3D) structure-toxicity relationship of cephalosporins was explored by computing the most stable conformations of 33 kinds of cephalosporins in aqueous solution and using the teratogenicity and lethality of these compounds obtained in zebrafish embryo toxicity testing to evaluate their toxic effects. The toxic effect of cefatirizine amidine sodium, a novel cephalosporin which has finished preclinical study, was investigated. It is thought that the teratogenic effect of the triazine ring at the C-3 position is the main toxic effect of cefatirizine amidine. In addition, cefatirizine amidine is no more toxic than cefathiamidine and ceftriaxone. The results of the zebrafish embryo toxicity test combined with gene expression microarray technology were consistent with the prediction. The toxic effects of some potential process-related impurities of cefatirizine amidine were also predicted.