Hepatitis B virus (HBV) infection has a high prevalence among hemodialysis and renal transplant patients. Data regarding genotype distribution in these populations are scarce and are still under investigation. The aim of this study was to evaluate the distribution of HBV genotypes in end-stage renal disease (ESRD)-patients and renal transplant patients and to compare with the distribution observed in immunocompetent patients from the same geographic region. From a population of 213 patients evaluated initially, 120 patients with detectable HBV-DNA were included in the study and submitted to genotype determination by amplification of S gene by nested PCR followed by sequencing method. Among 41 hemodialysis patients the most frequent genotype was D (83%), followed by genotype A (10%), C (5%), and F (2%). Genotype D was also the most prevalent (73%) among 33 renal transplant patients, followed by genotype A (18%), F (6%), and B (3%). This distribution was similar in these two groups of patients and for the comparative analysis they were considered in the kidney disease group. Compared to immunocompetents, patients with kidney disease (ESRD and renal transplant patients) showed a distinct distribution, with a higher prevalence of genotype D (78% vs. 17%, P < 0.001) whereas genotype A was the most prevalent among immunocompetent patients (70% vs. 14%, P < 0.001). In conclusion, the higher frequency of genotype A in immunocompetent patients and of genotype D in patients with renal disease suggest a higher capacity of environmental transmission or a better adaptability of this genotype in patients with a different pattern of immunologic response.