The MYB transcription factor (TF) family is one of the largest plant transcription factor gene family playing vital roles in plant growth and development, including defense, cell differentiation, secondary metabolism, and responses to biotic and abiotic stresses. As a model tree species of woody plants, in recent years, the identification and functional prediction of certain MYB family members in the poplar genome have been reported. However, to date, the characterization of the gene family in the genome of the poplar’s sister species willow has not been done, nor are the differences and similarities between the poplar and willow genomes understood. In this study, we conducted the first genome-wide investigation of the R2R3 MYB subfamily in the willow, identifying 216 R2R3 MYB gene members, and combined with the poplar R2R3 MYB genes, performed the first comparative analysis of R2R3 MYB genes between the poplar and willow. We identified 81 and 86 pairs of R2R3 MYB paralogs in the poplar and willow, respectively. There were 17 pairs of tandem repeat genes in the willow, indicating active duplication of willow R2R3 MYB genes. A further 166 pairs of poplar and willow orthologs were identified by collinear and synonymous analysis. The findings support the duplication of R2R3 MYB genes in the ancestral species, with most of the R2R3 MYB genes being retained during the evolutionary process. The phylogenetic trees of the R2R3 MYB genes of 10 different species were drawn. The functions of the poplar and willow R2R3 MYB genes were predicted using reported functional groupings and clustering by OrthoFinder. Identified 5 subgroups in general expanded in woody species, three subgroups were predicted to be related to lignin synthesis, and we further speculate that the other two subgroups also play a role in wood formation. We analyzed the expression patterns of the GAMYB gene of subgroup 18 (S18) related to pollen development in the male flower buds of poplar and willow at different developmental stages by qRT-PCR. The results showed that the GAMYB gene was specifically expressed in the male flower bud from pollen formation to maturity, and that the expression first increased and then decreased. Both the specificity of tissue expression specificity and conservation indicated that GAMYB played an important role in pollen development in both poplar and willow and was an ideal candidate gene for the analysis of male flower development-related functions of the two species.