Pharmaceutical companies usually perform safety testing of vaccines, but all requirements of the World Health Organization and drug pharmacopoeias depend on general toxicity testing, and the gene expression study of hepatitis B vaccine is not done routinely to test vaccine quality. In this study, we applied a new technique of gene expression analysis to detect the inflammation and metabolism genes that might be affected by hepatitis B vaccine in mouse liver. Mice were used and divided into three groups: the first and second groups were treated with one or two human doses of vaccine, respectively, and the third group was used as a control. A microarray test showed that expression of 144 genes in the liver was significantly changed after 1 day of vaccination. Seven of these genes, which were related to inflammation and metabolism, were chosen and confirmed by quantitative real-time reverse transcription polymerase chain reaction (qRT-PCR) at 1, 4 and 7 days. The expression level of these genes can be considered as a biomarker for the effects of the vaccine.