Fun fact - Segamat was one of the original nine districts that gave Negeri Sembilan its name.
As for Segamat itself, the origin story stems shortly after the fall of Malacca. Sultan Mahmud Shah, his family, and his followers retreated south, and temporarily settled near a river. Among the group was Bendahara Seri Paduka Tuan (also known as Bendahara Tepok), the last Bendahara of Malacca.
By this river, two notable incidents took place, involving Bendahara Tepok. In the first, he asked one of his soldiers to lift a rock and throw it into a deep part (lubuk) of the river.
He declared that if the rock floated, they would attempt to retake Malacca from the Portuguese. But if it sank, they would establish a new kingdom elsewhere.
In the second, he asked his warrior, Selamat Gagah, to fetch him some water to drink. His low spirits revived by the crisp coolness of the water, he asked Selamat Gagah what the name of the river was.
Selamat Gagah didn’t know, and asked why. Bendahara Tepok said the water was Segar Amat (very refreshing). Selamat Gagah tried the water himself, and they both agreed that the water was indeed Segar Amat.
And that’s how the area was named Segamat.