Sayyiduna Sahl bin Sa'd al-Sa'idi (may Allah be pleased with him) says that a woman came to the Messenger of Allah (peace and blessings be upon him) and said: "O Messenger of Allah, I have given myself to you as a gift." She remained standing for a long time; then a man stood up and said: "O Messenger of Allah (peace and blessings be upon him), if you have no need of her, then marry her to me." He (peace and blessings be upon him) asked: "Do you have anything to give as a dower?" He said: "(Only) this lower garment of mine." He (peace and blessings be upon him) said: "If you give her this garment, you will have no garment left; look for something else." He said: "I cannot find anything." He (peace and blessings be upon him) said: "Look for even an iron ring." Despite searching he found nothing. He (peace and blessings be upon him) asked: "Do you know any part of the Qur'an?" He said: "Such-and-such surahs," and he named them. Then he (peace and blessings be upon him) said: "I have married her to you for the Qur'an (that is, teach her the Qur'an)."
(b) Sayyiduna Sahl bin Sa'd (may Allah be pleased with him) narrates in one of two narrations that he (peace and blessings be upon him) said: "I have married her to you in return for what you know of the Qur'an."
(c) In another narration he (peace and blessings be upon him) said: "I have married her to you in return for what you have of the Qur'an."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13818