Background: The purpose of this investigation was to specify the genotypes and subtypes of hepatitis B virus (HBV) by phylogenetic analysis and to investigate the mutations in the S gene region in chronic patients with hepatitis B surface antigen (HBsAg)-positive. Methods: In the present study, Serum sample of 95 patients with chronic HBV infection were subjected. Nested polymerase chain reaction was used for detection of HBV DNA. The S gene region of the DNA isolates was subjected to direct sequencing and phylogenetic analysis. Results: Genotype D was present in all isolates, and the predominant subtype was ayw2 (94.7%), followed by three isolates, ayw3 (3.1%), and two isolates, ayw4 (2.1%). There were totally 169 nucleotide changes. Eighty-one (47.92%) were missense, while 88 (52.07%) were silent. None of the nucleotide or amino acid changes were seen in 31 (32.6%) patients. Eight (8.4%) of the 95 samples had at least one mutation in the HBsAg "a" determinant region. Fifty-eight (71.6%) of the 81 amino acid changes in the surface protein occurred in immunological epitopes, with 16 (27.5%) occurring in B cell epitopes, 17 (29.3%) in T helper epitopes, and 25 (43.1%) in internal cytotoxic T lymphocyte epitopes. Conclusion: This investigation demonstrated that the genotype D is the prevalent genotype in Eastern Azerbaijan province, similar to other Iranian areas and Mediterranean nations. Furthermore, the highest rate of mutation of antigenic epitopes occurred in the T lymphocyte epitopes of our patients.