Six transmembrane protein of prostate 2 (STAMP2) plays a key role in linking inflammatory and diet-derived signals to systemic metabolism. STAMP2 is induced by nutrients/feeding as well as by cytokines such as TNF alpha, IL-1 beta, and IL-6. Here, we demonstrated that STAMP2 protein physically interacts with and decreases the stability of hepatitis B virus X protein (HBx), thereby counteracting HBx-induced hepatic lipid accumulation and insulin resistance. STAMP2 suppressed the HBx-mediated transcription of lipogenic and adipogenic genes. Furthermore, STAMP2 prevented HBx-induced degradation of IRS1 protein, which mediates hepatic insulin signaling, as well as restored insulin-mediated inhibition of gluconeogenic enzyme expression, which are gluconeogenic genes. We also demonstrated reciprocal expression of HBx and STAMP2 in HBx transgenic mice. These results suggest that hepatic STAMP2 antagonizes HBx-mediated hepatocyte dysfunction, thereby protecting hepatocytes from HBV gene expression.