Muhammad Saleh was brought up by his father who was the Chief Imam during the rule of the Sultanate of Riau in the 1800s. During his childhood, his father has taught him martial arts and horseback riding. Muhammad Saleh also seek his knowledge from Islamic scholars in Bonjol and Rao.