Biodesulfurization of crude oil is a highly promising technology for achieving thorough desulfurization. In this study, a bacterial strain, designated as SWX-4, was isolated from sandstone oil in the Ordos Basin that had the ability to utilize dibenzothiophene (DBT) as a carbon source. Through physiological and biochemical characterization as well as 16S rRNA sequencing, the isolate was identified as Gordonia sp. The genome of strain SWX-4 was found to be 5,303,410 bp in size, with a GC content of 67.44%. It comprised 12 rRNA genes, 51 tRNA genes, and two plasmids. Genome analysis revealed the presence of 4,683 functional genes potentially involved in DBT desulfurization, as well as the oxidation of alkanes and aromatic compounds. Notably, the genome of strain SWX-4 also contained genes encoding sfnG, sfnB, and terD, which are known to be responsible for the desulfurization activity of DBT. These genes exhibited functional similarity to the well-conserved dszABC operons. Furthermore, a comparative genomic analysis of 43 Gordonia strains isolated from various habitats was conducted to explore their genetic diversity. The results revealed that Gordonia sp. possesses an open pan-genome with a total of 774 core genes present across all strains. On average, these core genes accounted for 18% of each individual genome. Additionally, phylogenetic tree analysis and the distribution of accessory genes showed that each strain harbored a distinct set of unique genes. Interestingly, genes associated with biodesulfurization were found to be distributed among different branches of the phylogenetic tree. This suggests that these strains have the capacity to acquire new genes through horizontal gene transfer from their environments, thereby increasing the diversity of their bacterial genomes. However, we did not observe a direct evolutionary correlation between the bacterial genome and desulfurization metabolism. Overall, our findings provide valuable insights into the biodegradation of DBT by the SWX-4 strain and offer an efficient bacterial resource for biodesulfurization.