Process mining techniques have been used to discover and analyze workflows in various fields, ranging from business management to healthcare. Much of this research, however, has overlooked the potential of hidden Markov models (HMMs) for workflow discovery. We present a novel alignment-guided state-splitting HMM inference algorithm (AGSS) for discovering workflow models based on observed traces of process executions. We compared the AGSS to existing methods using four real-world medical workflow datasets and a more detailed case study on one of them. Our numerical results show that AGSS not only generates more accurate workflow models, but also better represents the underlying process. In addition, with trace alignment to guide state splitting, AGSS is significantly more efficient (by a factor of O(n)) than previous HMM inference algorithms. Our case study results show that our approach produces a more readable and accurate workflow model that existing algorithms. Comparing the discovered model to the hand-made expert model of the same process, we found three discrepancies. These three discrepancies were reconsidered by medical experts and used for enhancing the expert model.