Since 5000 BC, the Egyptians made a tooth powder, which consisted of powdered ashes of ox hooves, myrrh, powdered and burnt eggshells, and pumice. The Greeks, and then the Romans, improved the recipes by adding abrasives such as crushed bones and oyster shells. In the 9th century, Iraqi musician and fashion designer Ziryab invented a type of toothpaste, which he popularized throughout Islamic Spain. The exact ingredients of this toothpaste are unknown, but it was reported to have been both "functional and pleasant to taste". It is not known whether these early toothpastes were used alone, were to be rubbed onto the teeth with rags, or were to be used with early toothbrushes, such as neem-tree twigs and miswak. During Japan's Edo period, inventor Hiraga Gennai's Hika rakuyo (1769) contained advertisements for Sosekiko, a "toothpaste in a box." Toothpastes or powders came into general use in the 19th century.
Read more, here.