We investigate systems of equations and the first-order theory of one-relator monoids and of word-hyperbolic monoids. We describe a family of one-relator monoids of the form xA | w " 1y with decidable Diophantine problem (i.e. decidable systems of equations), and another family F of one-relator monoids xA | w " 1y where for each monoid M in F , the longstanding open problem of decidability of word equations with length constraints reduces to the Diophantine problem in M . This is achieved by interpreting by systems of equations in M a free monoid with a length relation. It follows that each monoid in F has undecidable positive AE-theory, hence in particular it has undecidable first-order theory. The family F includes many one-relator monoids with torsion xA | w n " 1y (n ą 1), which have hyperbolic group of units and hyperbolic undirected Cayley graph. Contrastingly, all one-relator groups with torsion are hyperbolic, and all hyperbolic groups are known to have decidable Diophantine problem.For word-hyperbolic monoids, we prove that the polycyclic monoid has decidable Diophantine problem but undecidable positive AE-theory. We shall also observe that there exist families of word-hyperbolic monoids such that the decidability problem of word equations with length constraints is reducible to the Diophantine problem in any of these monoids. We finish the paper with a list of open problems and questions.