B-class MADS-box genes are sufficient for the specification of petals and stamens; however, the role of <italic>Tomato MADS-box protein 6</italic> (<italic>TM6</italic>) in seed formation in pear remains largely unknown. In this study, <italic>PbTM6a</italic> and <italic>PbTM6b</italic>, characterized as negative regulators of the response to GA<sub>4+7</sub>, were identified as classic B-class MADS-box genes. Additionally, both of the genes encoding proteins carried the highly conserved MADS-box domain, and showed high expression levels in anther, petal and filament of 'Dangshansu'. Overexpression of <italic>PbTM6a</italic> in tomato reduced the number of seeds per fruit. Analysis of the anatomical structure of floral organs revealed that the reduction in seed number in transgenic fruits might be attributed to an obstacle of pollen release due to strongly formed stomium and limited ovary space of ovule development. Moreover, triphenyl tetrazolium chloride (TTC) staining and <italic>in vitro</italic> germination tests of pollen grains indicated that <italic>PbTM6a</italic> overexpression reduced pollen viability and germination rates. Reciprocal crosses showed that the reduction in seed number in transgenic fruits was dominantly caused by the decreased fertility of pollen grains. Subsequent scanning electron microscopy showed that sterile pollen grains were caused by abnormal pollen grains. Additionally, the reduced levels of jasmonic acid (JA), abscisic acid (ABA), indole-3-acetic acid (IAA) and gibberellin A3 (GA3) in transgenic stamens contributed to the development of sterile pollen. Collectively, our results reveal the role of <italic>PbTM6a</italic> genes in controlling male infertility and broaden our understanding of the mechanism underlying the function of B-class MADS-box genes in pear.