It is narrated from Sayyiduna Abu Qatadah (may Allah be pleased with him) that I saw the Messenger of Allah (peace and blessings be upon him) leading the people in prayer, and (his granddaughter) Sayyidah Umamah bint Abi Al-As (may Allah be pleased with her), who was the daughter of Sayyidah Zainab (may Allah be pleased with her), the daughter of the Messenger of Allah (peace and blessings be upon him), was riding on his shoulder. When the Prophet (peace and blessings be upon him) would bow (for ruku‘), he would put her down on the ground, and when he rose from prostration, he would pick her up again.
Hadith Referenceالسنن المأثورة / باب ما جاء في الصلاة في السفر / 20
Hadith Takhrijصحيح مسلم، المساجد ومواضع الصلاة باب جواز حمل الصبيان في الصلاة، رقم: 543