Abstract Unlike studies of the evolutionary relationship between languages, the dialect-level variation within a language has seldom been studied within the framework of a phylogenetic tree, because frequent lexical borrowing muddles the evidence of shared ancestry. The phonological history of Japanese is an exceptional case study where the phenomenon called accentual class merger enables the phylogenetic analysis of dialectal pitch-accent systems in a way that is not subject to borrowing. However, previous studies have lacked statistical analysis and failed to evaluate the relative credence of alternative hypotheses. Here we developed a novel substitution model that describes the mutation of pitch-accent systems driven by accentual class merger and integrated the model into the framework of Bayesian phylogenetic inference with geographical diffusion. Applying the method to data on the pitch-accent variation in modern Japanese dialects and historical documents collected from literature, we reconstructed the evolutionary history and spatial diffusion of pitch-accent systems. Our result supports the monophyly of each of three groups of pitch-accent systems in conventional categorization, namely Tokyo type, Keihan type, and N-kei (N-pattern) type of Kyushu, whereas the monophyly of the Tokyo type has been highly controversial in previous studies. The divergence time of the mainland pitch-accent systems was estimated to be from mid-Kofun to early Heian period. Also, it is suggested that the modern Kyoto dialect did not inherit its accent patterns from Bumoki but from an unrecorded lineage which survived from the Muromachi period. Analyses on geographical diffusion suggest that the most recent common ancestor (MRCA) of all the taxa and that of Keihan type were located in or around the Kinki region, whereas the MRCA of N-kei type was located in northern to central Kyushu. The geographical location of the MRCA of Tokyo type remains unclear, but the Kinki and Kanto regions are the most plausible candidates.